diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-12-03 09:05:05 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-12-03 09:05:05 +0000 |
commit | e04c6a878f5044d36eaa95d4c2318e0381a32998 (patch) | |
tree | 5b7c36578140e48c0114863004c8375ea55db21d /Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl | |
parent | fa438554bd1a061515cd8f5f46fbe311ff08dcd6 (diff) |
icu 4.6
git-svn-id: svn://tug.org/texlive/trunk@20645 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl')
-rwxr-xr-x | Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl b/Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl new file mode 100755 index 00000000000..0bcdaa0b4f8 --- /dev/null +++ b/Build/source/libs/icu/icu-4.6/test/perf/ustrperf/StringPerf.pl @@ -0,0 +1,75 @@ +#!/usr/bin/perl +# ******************************************************************** +# * COPYRIGHT: +# * Copyright (c) 2003-2008, International Business Machines Corporation and +# * others. All Rights Reserved. +# ******************************************************************** + + +#use strict; + +require "../perldriver/Common.pl"; + +use lib '../perldriver'; + +use PerfFramework; + +my $options = { + "title"=>"Unicode String performance: ICU ".$ICULatestVersion." vs. STDLib", + "headers"=>"StdLib ICU".$ICULatestVersion, + "operationIs"=>"Unicode String", + "timePerOperationIs"=>"Time per Unicode String", + "passes"=>"5", + "time"=>"2", + #"outputType"=>"HTML", + "dataDir"=>$CollationDataPath, + "outputDir"=>"../results" + }; + + +# programs +# tests will be done for all the programs. Results will be stored and connected +my $p; +if ($OnWindows) { + $p = $ICUPathLatest."/ustrperf/$WindowsPlatform/Release/stringperf.exe -l -u"; +} else { + $p = $ICUPathLatest."/ustrperf/stringperf -l -u"; +} + +my $tests = { +"Object Construction(empty string)", ["$p TestStdLibCtor" , "$p TestCtor" ], +"Object Construction(single char)", ["$p TestStdLibCtor1" , "$p TestCtor1" ], +"Object Construction(another string)", ["$p TestStdLibCtor2" , "$p TestCtor2" ], +"Object Construction(string literal)", ["$p TestStdLibCtor3" , "$p TestCtor3" ], +"String Assignment(helper)", ["$p TestStdLibAssign" , "$p TestAssign" ], +"String Assignment(string literal)", ["$p TestStdLibAssign1" , "$p TestAssign1" ], +"String Assignment(another string)", ["$p TestStdLibAssign2" , "$p TestAssign2" ], +"Get String or Character", ["$p TestStdLibGetch" , "$p TestGetch" ], +"Concatenation", ["$p TestStdLibCatenate" , "$p TestCatenate" ], +"String Scanning(char)", ["$p TestStdLibScan" , "$p TestScan" ], +"String Scanning(string)", ["$p TestStdLibScan1" , "$p TestScan1" ], +"String Scanning(char set)", ["$p TestStdLibScan2" , "$p TestScan2" ], +}; + +my $dataFiles = { + "", + [ + "TestNames_Asian.txt", + "TestNames_Chinese.txt", + "TestNames_Simplified_Chinese.txt", + "TestNames_Japanese_h.txt", + "TestNames_Japanese_k.txt", + "TestNames_Korean.txt", + "TestNames_Latin.txt", + "TestNames_SerbianSH.txt", + "TestNames_SerbianSR.txt", + "TestNames_Thai.txt", + "Testnames_Russian.txt", + "th18057.txt", + ] + }; + +runTests($options, $tests, $dataFiles); + +# The whole command line would be something like: +# stringperf.exe -p 5 -t 2 -f c:/src/data/perf/TestNames_Asian.txt -l -u TestStdLibCatenate
\ No newline at end of file |