1 #!/usr/bin/perl 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 # ******************************************************************** 7 # * COPYRIGHT: 8 # * Copyright (c) 2008-2013, International Business Machines Corporation and 9 # * others. All Rights Reserved. 10 # ******************************************************************** 11 12 #use strict; 13 14 use lib '../perldriver'; 15 16 require "../perldriver/Common.pl"; 17 18 use PerfFramework; 19 20 my $options = { 21 "title"=>"Collation performanceregression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", 22 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, 23 "operationIs"=>"unicode String", 24 "passes"=>"1", 25 "time"=>"2", 26 #"outputType"=>"HTML", 27 "dataDir"=>$CollationDataPath, 28 "outputDir"=>"../results" 29 }; 30 31 # programs 32 # tests will be done for all the programs. Results will be stored and connected 33 my $p1, $p2; 34 35 if ($OnWindows) { 36 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/collperf/$WindowsPlatform/Release/collperf.exe"; 37 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/collperf/$WindowsPlatform/Release/collperf.exe"; 38 } else { 39 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/collperf/collperf"; 40 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/collperf/collperf"; 41 } 42 43 44 my $tests = { 45 "Key Gen ICU null", ["$p1,TestIcu_KeyGen_null", "$p2,TestIcu_KeyGen_null"], 46 "Key Gen ICU len", ["$p1,TestIcu_KeyGen_len", "$p2,TestIcu_KeyGen_len"], 47 "Iteration icu forward null", ["$p1,TestIcu_ForwardIter_null", "$p2,TestIcu_ForwardIter_null"], 48 "Iteration icu forward len", ["$p1,TestIcu_ForwardIter_len", "$p2,TestIcu_ForwardIter_len"], 49 "Iteration icu backward null", ["$p1,TestIcu_BackwardIter_null", "$p2,TestIcu_BackwardIter_null"], 50 "Iteration icu backward len", ["$p1,TestIcu_BackwardIter_len", "$p2,TestIcu_BackwardIter_len"], 51 "Iteration/all icu forward null", ["$p1,TestIcu_ForwardIter_all_null", "$p2,TestIcu_ForwardIter_all_null"], 52 "Iteration/all icu forward len", ["$p1,TestIcu_ForwardIter_all_len", "$p2,TestIcu_ForwardIter_all_len"], 53 "Iteration/all icu backward null", ["$p1,TestIcu_BackwardIter_all_null", "$p2,TestIcu_BackwardIter_all_null"], 54 "Iteration/all icu backward len", ["$p1,TestIcu_BackwardIter_all_len", "$p2,TestIcu_BackwardIter_all_len"], 55 "qsort icu strcoll null", ["$p1,TestIcu_qsort_strcoll_null", "$p2,TestIcu_qsort_strcoll_null"], 56 "qsort icu strcoll len", ["$p1,TestIcu_qsort_strcoll_len", "$p2,TestIcu_qsort_strcoll_len"], 57 "qsort icu use key", ["$p1,TestIcu_qsort_usekey", "$p2,TestIcu_qsort_usekey"], 58 "Binary Search icu strcoll null", ["$p1,TestIcu_BinarySearch_strcoll_null", "$p2,TestIcu_BinarySearch_strcoll_null"], 59 "Binary Search icu strcoll len", ["$p1,TestIcu_BinarySearch_strcoll_len", "$p2,TestIcu_BinarySearch_strcoll_len"], 60 "Binary Search icu use key", ["$p1,TestIcu_BinarySearch_usekey", "$p2,TestIcu_BinarySearch_usekey"], 61 "Binary Search icu u_strcmp", ["$p1,TestIcu_BinarySearch_strcmp", "$p2,TestIcu_BinarySearch_strcmp"], 62 "Binary Search icu cmpCPO", ["$p1,TestIcu_BinarySearch_cmpCPO", "$p2,TestIcu_BinarySearch_cmpCPO"], 63 }; 64 65 my $dataFiles = { 66 "", 67 [ 68 "TestNames_Asian.txt", 69 "TestNames_Chinese.txt", 70 "TestNames_Japanese.txt", 71 "TestNames_Japanese_h.txt", 72 "TestNames_Japanese_k.txt", 73 "TestNames_Korean.txt", 74 "TestNames_Latin.txt", 75 "TestNames_Russian.txt", 76 "TestNames_SerbianSH.txt", 77 "TestNames_SerbianSR.txt", 78 "TestNames_Simplified_Chinese.txt", 79 "TestNames_Thai.txt" 80 ] 81 }; 82 83 runTests($options, $tests, $dataFiles); 84