X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/73c04bcfe1096173b00431f0cdc742894b15eef0..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/test/perf/utfperf/UtfPerf.pl diff --git a/icuSources/test/perf/utfperf/UtfPerf.pl b/icuSources/test/perf/utfperf/UtfPerf.pl old mode 100644 new mode 100755 index 0c7ff961..b9d6cac3 --- a/icuSources/test/perf/utfperf/UtfPerf.pl +++ b/icuSources/test/perf/utfperf/UtfPerf.pl @@ -1,46 +1,54 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl +# ******************************************************************** +# * Copyright (C) 2016 and later: Unicode, Inc. and others. +# * License & terms of use: http://www.unicode.org/copyright.html#License +# ******************************************************************** # ******************************************************************** # * COPYRIGHT: -# * Copyright (c) 2005, International Business Machines Corporation and +# * Copyright (c) 2005-2013, International Business Machines Corporation and # * others. All Rights Reserved. # ******************************************************************** -use strict; +#use strict; + +require "../perldriver/Common.pl"; use lib '../perldriver'; use PerfFramework; - my $options = { - "title"=>"Utf performance: ICU", - "headers"=>"ICU", - "operationIs"=>"gb18030 encoding string", - "passes"=>"1", - "time"=>"2", - #"outputType"=>"HTML", - "dataDir"=>"../data", - "outputDir"=>"../results" - }; + "title"=>"UTF performance: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", + "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, + "operationIs"=>"gb18030 encoding string", + "passes"=>"1", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>$ConversionDataPath, + "outputDir"=>"../results" +}; # programs # tests will be done for all the programs. Results will be stored and connected -my $p = "debug/utfperf.exe -e gb18030"; +my $p1; +my $p2; + +if ($OnWindows) { + $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/utfperf/$WindowsPlatform/Release/utfperf.exe -e gb18030"; # Previous + $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/utfperf/$WindowsPlatform/Release/utfperf.exe -e gb18030"; # Latest +} else { + $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/utfperf/utfperf -e gb18030"; # Previous + $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/utfperf/utfperf -e gb18030"; # Latest +} my $tests = { - "UTF-8", ["$p UTF_8"], - "UTF-8 small buffer", ["$p UTF_8_SB"], - "SCSU", ["$p SCSU"], - "SCSU small buffer", ["$p SCSU_SB"], - "BOCU_1", ["$p BOCU_1"], - "BOCU_1 small buffer", ["$p BOCU_1_SB"], - }; + "Roundtrip", ["$p1,Roundtrip", "$p2,Roundtrip"], + "FromUnicode", ["$p1,FromUnicode", "$p2,FromUnicode"], + "FromUTF8", ["$p1,FromUTF8", "$p2,FromUTF8"], +}; my $dataFiles = { - "", - [ - "four.txt" - ] - }; + "", ["xuzhimo.txt"] +}; runTests($options, $tests, $dataFiles);