#!/usr/local/bin/perl
-# ********************************************************************
+# ***********************************************************************
# * COPYRIGHT:
-# * Copyright (c) 2002, International Business Machines Corporation and
-# * others. All Rights Reserved.
-# ********************************************************************
+# * Copyright (c) 2002-2008, International Business Machines Corporation
+# * and others. All Rights Reserved.
+# ***********************************************************************
use strict;
my $iterCount = 0;
my $NUMPASSES = 4;
my $TIME = 2;
+my $ITERATIONS; #Added by Doug
my $DATADIR;
sub setupOptions {
if($options{"dataDir"}) {
$DATADIR = $options{"dataDir"};
}
+
+ # Added by Doug
+ if ($options{"iterations"}) {
+ $ITERATIONS = $options{"iterations"};
+ }
}
sub runTests {
# first we calibrate. Use time from somewhere
# first test is used for calibration
($program, @argsAndTest) = split(/\ /, @{ $tests{$i} }[$j]);
- my $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest";
+ #Modified by Doug
+ my $commandLine;
+ if ($ITERATIONS) {
+ $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest";
+ } else {
+ $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest";
+ }
#my $commandLine = "$program -i 5 -p $NUMPASSES $locAndData @argsAndTest";
my @res = measure1($commandLine);
store("$i, $program @argsAndTest", @res);
}
else {
- die "Can't parse: $_";
+ # die "Can't parse: $_";
}
}