]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/collperf2/CollPerf2_r.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) 2013-2014, International Business Machines Corporation and 
   9 #  others. All Rights Reserved. 
  10 # ******************************************************************** 
  12 # Variables need to be set in ../perldriver/Common.pl for where ICU is on your machine. 
  13 # Copy Common.pl.template to Common.pl and modify it. 
  15 # Sample Common.pl "Settings by user" for a Linux out-of-source build: 
  17 # $ICULatestVersion = "collv2"; 
  18 # $ICUPreviousVersion = "52"; 
  20 # $PerformanceDataPath = "/home/mscherer/svn.icudata/trunk/src/test/perf"; 
  22 # $ICULatest = "/home/mscherer/svn.icu/collv2/bld"; 
  23 # $ICUPrevious = "/home/mscherer/svn.icu/trunk/bld"; 
  25 # The first time around, you also need to 
  26 #   source/test/perf/collperf2$ mkdir ../results 
  28 #   source/test/perf/collperf2$ ./CollPerf2_r.pl 
  30 # Sample debug invocation: 
  31 #   ~/svn.icu/trunk/dbg/test/perf/collperf2$ LD_LIBRARY_PATH=../../../lib:../../../tools/ctestfw ./collperf2 -t 5 -p 1  -L "de" -f /home/mscherer/svn.icudata/trunk/src/test/perf/collation/TestNames_Latin.txt TestStringPieceSort 
  35 use lib 
'../perldriver'; 
  37 require "../perldriver/Common.pl"; 
  42     "title"=>"Collation Performance Regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", 
  43     "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, 
  44     "operationIs"=>"Collator", 
  47     #"outputType"=>"HTML", 
  48     "dataDir"=>$CollationDataPath, 
  49     "outputDir"=>"../results" 
  53 # tests will be done for all the programs. Results will be stored and connected 
  57     $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/collperf2/$WindowsPlatform/Release/collperf2.exe"; 
  58     $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/collperf2/$WindowsPlatform/Release/collperf2.exe"; 
  60     $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/lib:".$ICUPrevious."/tools/ctestfw ".$ICUPrevious."/test/perf/collperf2/collperf2"; 
  61     $p2 = "LD_LIBRARY_PATH=".$ICULatest."/lib:".$ICULatest."/tools/ctestfw ".$ICULatest."/test/perf/collperf2/collperf2"; 
  65     "ucol_strcoll/len",             ["$p1,TestStrcoll", "$p2,TestStrcoll"], 
  66     "ucol_strcoll/null",            ["$p1,TestStrcollNull", "$p2,TestStrcollNull"], 
  67     "ucol_strcoll/len/similar",     ["$p1,TestStrcollSimilar", "$p2,TestStrcollSimilar"], 
  69     "ucol_strcollUTF8/len",         ["$p1,TestStrcollUTF8", "$p2,TestStrcollUTF8"], 
  70     "ucol_strcollUTF8/null",        ["$p1,TestStrcollUTF8Null", "$p2,TestStrcollUTF8Null"], 
  71     "ucol_strcollUTF8/len/similar", ["$p1,TestStrcollUTF8Similar", "$p2,TestStrcollUTF8Similar"], 
  73     "ucol_getSortKey/len",          ["$p1,TestGetSortKey", "$p2,TestGetSortKey"], 
  74     "ucol_getSortKey/null",         ["$p1,TestGetSortKeyNull", "$p2,TestGetSortKeyNull"], 
  76     "ucol_nextSortKeyPart/4_all",   ["$p1,TestNextSortKeyPart_4All", "$p2,TestNextSortKeyPart_4All"], 
  77     "ucol_nextSortKeyPart/4x4",     ["$p1,TestNextSortKeyPart_4x4", "$p2,TestNextSortKeyPart_4x4"], 
  78     "ucol_nextSortKeyPart/4x8",     ["$p1,TestNextSortKeyPart_4x8", "$p2,TestNextSortKeyPart_4x8"], 
  79     "ucol_nextSortKeyPart/32_all",  ["$p1,TestNextSortKeyPart_32All", "$p2,TestNextSortKeyPart_32All"], 
  80     "ucol_nextSortKeyPart/32x2",    ["$p1,TestNextSortKeyPart_32x2", "$p2,TestNextSortKeyPart_32x2"], 
  82     "ucol_nextSortKeyPart/UTF8/4_all",  ["$p1,TestNextSortKeyPartUTF8_4All", "$p2,TestNextSortKeyPartUTF8_4All"], 
  83     "ucol_nextSortKeyPart/UTF8/4x4",    ["$p1,TestNextSortKeyPartUTF8_4x4", "$p2,TestNextSortKeyPartUTF8_4x4"], 
  84     "ucol_nextSortKeyPart/UTF8/4x8",    ["$p1,TestNextSortKeyPartUTF8_4x8", "$p2,TestNextSortKeyPartUTF8_4x8"], 
  85     "ucol_nextSortKeyPart/UTF8/32_all", ["$p1,TestNextSortKeyPartUTF8_32All", "$p2,TestNextSortKeyPartUTF8_32All"], 
  86     "ucol_nextSortKeyPart/UTF8/32x2",   ["$p1,TestNextSortKeyPartUTF8_32x2", "$p2,TestNextSortKeyPartUTF8_32x2"], 
  88     "Collator::compare/len",                ["$p1,TestCppCompare", "$p2,TestCppCompare"], 
  89     "Collator::compare/null",               ["$p1,TestCppCompareNull", "$p2,TestCppCompareNull"], 
  90     "Collator::compare/len/similar",        ["$p1,TestCppCompareSimilar", "$p2,TestCppCompareSimilar"], 
  92     "Collator::compareUTF8/len",            ["$p1,TestCppCompareUTF8", "$p2,TestCppCompareUTF8"], 
  93     "Collator::compareUTF8/null",           ["$p1,TestCppCompareUTF8Null", "$p2,TestCppCompareUTF8Null"], 
  94     "Collator::compareUTF8/len/similar",    ["$p1,TestCppCompareUTF8Similar", "$p2,TestCppCompareUTF8Similar"], 
  96     "Collator::getCollationKey/len",        ["$p1,TestCppGetCollationKey", "$p2,TestCppGetCollationKey"], 
  97     "Collator::getCollationKey/null",       ["$p1,TestCppGetCollationKeyNull", "$p2,TestCppGetCollationKeyNull"], 
  99     "sort UnicodeString*[]: compare()",         ["$p1,TestUniStrSort", "$p2,TestUniStrSort"], 
 100     "sort StringPiece[]: compareUTF8()",        ["$p1,TestStringPieceSortCpp", "$p2,TestStringPieceSortCpp"], 
 101     "sort StringPiece[]: ucol_strcollUTF8()",   ["$p1,TestStringPieceSortC", "$p2,TestStringPieceSortC"], 
 103     "binary search UnicodeString*[]: compare()",        ["$p1,TestUniStrBinSearch", "$p2,TestUniStrBinSearch"], 
 104     "binary search StringPiece[]: compareUTF8()",       ["$p1,TestStringPieceBinSearchCpp", "$p2,TestStringPieceBinSearchCpp"], 
 105     "binary search StringPiece[]: ucol_strcollUTF8()",  ["$p1,TestStringPieceBinSearchC", "$p2,TestStringPieceBinSearchC"], 
 111         "TestNames_Latin.txt" 
 114     "de-u-co-phonebk-ks-level2", 
 116         "TestRandomWordsUDHR_de.txt" 
 121         "TestRandomWordsUDHR_fr.txt" 
 126         "TestRandomWordsUDHR_es.txt" 
 131         "TestRandomWordsUDHR_pl.txt" 
 136         "TestRandomWordsUDHR_tr.txt" 
 141         "TestRandomWordsUDHR_el.txt" 
 146         "TestNames_Russian.txt" 
 149     "ru-u-ks-level4-ka-shifted", 
 151         "TestRandomWordsUDHR_ru.txt" 
 156         "TestNames_Japanese.txt", 
 157         "TestNames_Japanese_h.txt", 
 158         "TestNames_Japanese_k.txt" 
 163         "TestNames_Latin.txt", 
 164         "TestNames_Japanese.txt" 
 169         "TestNames_Korean.txt" 
 174         "TestNames_Simplified_Chinese.txt" 
 177     "zh_Hans-u-co-pinyin", 
 179         "TestNames_Latin.txt", 
 180         "TestNames_Simplified_Chinese.txt" 
 185         "TestNames_Chinese.txt", 
 188     "th-u-kk-ka-shifted", 
 190         "TestNames_Latin.txt", 
 191         "TestNames_Thai.txt", 
 192         "TestRandomWordsUDHR_th.txt" 
 197         "TestRandomWordsUDHR_ar.txt" 
 202         "TestRandomWordsUDHR_he.txt" 
 206 runTests
($options, $tests, $dataFiles);