New benchmark run to test Sergey's schema
[koha.git] / marc / benchmarks / runbenchmark
1 #!/usr/bin/perl
2 #
3 #
4 #  This script will iterate through each benchmark 5 times, looking up 500
5 #  random records each time.  Results will be printed to STDOUT.
6
7 my @benchmarks=('getdata-steve', 'getdata-sergey');
8 my $numrecords=$ARGV[0];
9 my $numindb=$ARGV[1];
10 ($numrecords) || ($numrecords=50);
11 ($numindb) || ($numindb=79998);
12
13 my $iterations=5;
14
15 foreach (@benchmarks) {
16     print "$_:\t";
17     for ($i=1; $i<=$iterations; $i++) {
18         my $timer=`/usr/bin/time -f "%E" perl $_ $numrecords 0 $numindb 2>&1`;
19         chomp $timer;
20         print "$timer\t";
21     }
22     print "\n";
23 }