]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/ustrperf/StringPerf.pl
   2 #  ******************************************************************** 
   3 #  * Copyright (C) 2016 and later: Unicode, Inc. and others. 
   4 #  *License & terms of use: http://www.unicode.org/copyright.html#License 
   5 #  ******************************************************************** 
   6 #  ******************************************************************** 
   8 #  * Copyright (c) 2003-2013, International Business Machines Corporation and 
   9 #  * others. All Rights Reserved. 
  10 #  ******************************************************************** 
  15 require "../perldriver/Common.pl"; 
  17 use lib 
'../perldriver'; 
  22     "title"=>"Unicode String performance: ICU ".$ICULatestVersion." vs. STDLib", 
  23     "headers"=>"StdLib ICU".$ICULatestVersion, 
  24     "operationIs"=>"Unicode String", 
  25     "timePerOperationIs"=>"Time per Unicode String", 
  28     #"outputType"=>"HTML", 
  29     "dataDir"=>$CollationDataPath, 
  30     "outputDir"=>"../results" 
  35 # tests will be done for all the programs. Results will be stored and connected 
  38     $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/ustrperf/$WindowsPlatform/Release/stringperf.exe -l -u"; 
  40     $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/ustrperf/stringperf -l -u"; 
  44     "Object Construction(empty string)",      ["$p,TestStdLibCtor"         , "$p,TestCtor"         ], 
  45     "Object Construction(single char)",       ["$p,TestStdLibCtor1"        , "$p,TestCtor1"        ], 
  46     "Object Construction(another string)",    ["$p,TestStdLibCtor2"        , "$p,TestCtor2"        ], 
  47     "Object Construction(string literal)",    ["$p,TestStdLibCtor3"        , "$p,TestCtor3"        ], 
  48     "String Assignment(helper)",              ["$p,TestStdLibAssign"       , "$p,TestAssign"       ], 
  49     "String Assignment(string literal)",      ["$p,TestStdLibAssign1"      , "$p,TestAssign1"      ], 
  50     "String Assignment(another string)",      ["$p,TestStdLibAssign2"      , "$p,TestAssign2"      ], 
  51     "Get String or Character",                ["$p,TestStdLibGetch"        , "$p,TestGetch"        ], 
  52     "Concatenation",                          ["$p,TestStdLibCatenate"     , "$p,TestCatenate"     ], 
  53     "String Scanning(char)",                  ["$p,TestStdLibScan"         , "$p,TestScan"         ], 
  54     "String Scanning(string)",                ["$p,TestStdLibScan1"        , "$p,TestScan1"        ], 
  55     "String Scanning(char set)",              ["$p,TestStdLibScan2"        , "$p,TestScan2"        ], 
  61         "TestNames_Asian.txt", 
  62         "TestNames_Chinese.txt", 
  63         "TestNames_Simplified_Chinese.txt", 
  64         "TestNames_Japanese_h.txt", 
  65         "TestNames_Japanese_k.txt", 
  66         "TestNames_Korean.txt", 
  67         "TestNames_Latin.txt", 
  68         "TestNames_SerbianSH.txt", 
  69         "TestNames_SerbianSR.txt", 
  71         "Testnames_Russian.txt", 
  76 runTests
($options, $tests, $dataFiles); 
  78 # The whole command line would be something like: 
  79 #       stringperf.exe -p 5 -t 2 -f c:/src/data/perf/TestNames_Asian.txt -l -u TestStdLibCatenate