#!/usr/bin/perl

use strict;
use warnings;

print "\n===== Spawn Test Collections =====\n\n";

my $base_path = '/research/jmt12/gsdl-64-svn/collect';
my @collections = ('gdbm','sqlite','tdb');
my @sizes = (100,500,1000,5000,10000,50000,100000,500000,1000000);

foreach my $collection (@collections)
{
    foreach my $size (@sizes)
    {
	next if ($collection eq 'tdb' && $size == 5000);
	my $size_str = sprintf("%07d", $size);
	my $collection_name = $collection . $size_str;
	my $collection_path = $base_path . '/' . $collection_name;
	print " - Creating collection: " . $collection_name . "\n";
	`mkdir $collection_path`;
	`ln -s $base_path/$collection/etc $collection_path/etc`;
	`ln -s $base_path/lorem$size_str/import $collection_path/import`;
    }
}
print "\n===== Complete! =====\n\n";
