X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/test/perf/perldriver/PerfFramework.pm?ds=inline diff --git a/icuSources/test/perf/perldriver/PerfFramework.pm b/icuSources/test/perf/perldriver/PerfFramework.pm index 04d96a2b..99c48e6e 100644 --- a/icuSources/test/perf/perldriver/PerfFramework.pm +++ b/icuSources/test/perf/perldriver/PerfFramework.pm @@ -1,7 +1,7 @@ #!/usr/local/bin/perl # *********************************************************************** # * COPYRIGHT: -# * Copyright (c) 2002-2004, International Business Machines Corporation +# * Copyright (c) 2002-2013, International Business Machines Corporation # * and others. All Rights Reserved. # *********************************************************************** @@ -36,14 +36,14 @@ sub setupOptions { if($options{"passes"}) { $NUMPASSES = $options{"passes"}; } - + if($options{"dataDir"}) { $DATADIR = $options{"dataDir"}; } # Added by Doug if ($options{"iterations"}) { - $ITERATIONS = $options{"iterations"}; + $ITERATIONS = $options{"iterations"}; } } @@ -68,19 +68,19 @@ sub runTests { if (%datafiles) { foreach $locale (sort keys %datafiles ) { foreach $data (@{ $datafiles{$locale} }) { - closeTable; - my $locdata = ""; - if(!($locale eq "")) { - $locdata = "Locale: $locale
"; - } - $locdata .= "Datafile: $data
"; - startTest($locdata); - - if($DATADIR) { - compareLoop ($tests, $locale, $DATADIR."/".$data); - } else { - compareLoop ($tests, $locale, $data); - } + closeTable; + my $locdata = ""; + if(!($locale eq "")) { + $locdata = "Locale: $locale
"; + } + $locdata .= "Datafile: $data
"; + startTest($locdata); + + if($DATADIR) { + compareLoop ($tests, $locale, $DATADIR."/".$data); + } else { + compareLoop ($tests, $locale, $data); + } } } } else { @@ -97,12 +97,12 @@ sub compareLoop { my $datafile = shift; my $locAndData = ""; if($locale) { - $locAndData .= " -L $locale"; + $locAndData .= " -L \"$locale\""; } if($datafile) { $locAndData .= " -f $datafile"; } - + my $args; my ($i, $j, $aref); foreach $i ( sort keys %tests ) { @@ -118,14 +118,14 @@ sub compareLoop { for $j ( 0 .. $#{$aref} ) { # first we calibrate. Use time from somewhere # first test is used for calibration - ($program, @argsAndTest) = split(/\ /, @{ $tests{$i} }[$j]); + ($program, @argsAndTest) = split(/,/, @{ $tests{$i} }[$j]); #Modified by Doug my $commandLine; if ($ITERATIONS) { - $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest"; + $commandLine = "$program -i $ITERATIONS -p $NUMPASSES $locAndData @argsAndTest"; } else { - $commandLine = "$program -t $TIME -p $NUMPASSES $locAndData @argsAndTest"; - } + $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); @@ -134,9 +134,8 @@ sub compareLoop { push(@noopers, shift(@res)); my @data = @{ shift(@res) }; if($#res >= 0) { - push(@noevents, shift(@res)); - } - + push(@noevents, shift(@res)); + } shift(@data) if (@data > 1); # discard first run @@ -306,7 +305,7 @@ sub callProg { } else { - die "Can't parse: $_"; + # die "Can't parse: $_"; } }