X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..46f4442e9a5a4f3b98b7c1083586332f6a8a99a4:/icuSources/test/perf/perldriver/PerfFramework.pm diff --git a/icuSources/test/perf/perldriver/PerfFramework.pm b/icuSources/test/perf/perldriver/PerfFramework.pm index 2540e920..96ba82c0 100644 --- a/icuSources/test/perf/perldriver/PerfFramework.pm +++ b/icuSources/test/perf/perldriver/PerfFramework.pm @@ -1,9 +1,9 @@ #!/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; @@ -23,6 +23,7 @@ my $extraArgs; # stuff that always gets passed to the test program my $iterCount = 0; my $NUMPASSES = 4; my $TIME = 2; +my $ITERATIONS; #Added by Doug my $DATADIR; sub setupOptions { @@ -39,6 +40,11 @@ sub setupOptions { if($options{"dataDir"}) { $DATADIR = $options{"dataDir"}; } + + # Added by Doug + if ($options{"iterations"}) { + $ITERATIONS = $options{"iterations"}; + } } sub runTests { @@ -113,7 +119,13 @@ sub compareLoop { # 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); @@ -294,7 +306,7 @@ sub callProg { } else { - die "Can't parse: $_"; + # die "Can't parse: $_"; } }