summaryrefslogtreecommitdiffstats
path: root/TOOLS/perlbench.pl
blob: 7b285d9f0779a87716e50e5813dc7631cb371e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl -w
use strict;
use constant CMD => "./fastmem2-k7";

sub dobench {
	my $i;
	my ($runs, $sleep, $command) = @_;
	for($i = 0; $i < $runs; $i++) {
		sleep $sleep;
		system $command;
	}
}

print "Single run of sse bench with 1sec sleep:\n";
&dobench(1,1,CMD);
print "Sleeping 10seconds before starting next bench!\n";
sleep 10;		
print "10 runs of sse bench with 0sec sleep:\n";
&dobench(10,0,CMD);
print "Sleeping 10seconds before starting next bench!\n";
sleep 10;		
print "10 runs of sse bench with 1sec sleep:\n";
&dobench(10,1,CMD);
print "Sleeping 10seconds before starting next bench!\n";
sleep 10;		
print "10 runs of sse bench with 2sec sleep:\n";
&dobench(10,2,CMD);
print "Sleeping 10seconds before starting next bench!\n";
sleep 10;		
print "10 runs of sse bench with 3sec sleep:\n";
&dobench(10,3,CMD);
print "Bench finished!\n";