]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/perf/charperf/CharPerf_r.pl
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / charperf / CharPerf_r.pl
old mode 100644 (file)
new mode 100755 (executable)
index 304e2d9..85fecda
@@ -1,7 +1,11 @@
 #!/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) 2002-2008, International Business Machines
+#  * Copyright (c) 2002-2013, International Business Machines
 #  * Corporation and others. All Rights Reserved.
 #  ********************************************************************
 
@@ -14,44 +18,43 @@ use lib '../perldriver';
 use PerfFramework;
 
 my $options = {
-              "title"=>"Character property performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
-           "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
-              "operationIs"=>"code point",
-              "timePerOperationIs"=>"Time per code point",
-              "passes"=>"10",
-              "time"=>"5",
-              #"outputType"=>"HTML",
-              "dataDir"=>"Not Using Data Files",
-              "outputDir"=>"../results"
-             };
+    "title"=>"Character property performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
+    "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
+    "operationIs"=>"code point",
+    "timePerOperationIs"=>"Time per code point",
+    "passes"=>"10",
+    "time"=>"5",
+    #"outputType"=>"HTML",
+    "dataDir"=>"Not Using Data Files",
+    "outputDir"=>"../results"
+};
 
 # programs
 
 my $p1; # Previous
 my $p2; # Latest
 if ($OnWindows) {
-       $p1 = $ICUPathPrevious."/charperf/Release/charperf.exe";
-       $p2 = $ICUPathLatest."/charperf/Release/charperf.exe";
+    $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/charperf/$WindowsPlatform/Release/charperf.exe";
+    $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe";
 } else {
-       $p1 = $ICUPathPrevious."/charperf/charperf";
-    $p2 = $ICUPathLatest."/charperf/charperf";
+    $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/charperf/charperf";
+    $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf";
 }
 
 my $dataFiles = "";
 
-
 my $tests = { 
-"isAlpha",        ["$p1 TestIsAlpha"        , "$p2 TestIsAlpha"        ],
-"isUpper",        ["$p1 TestIsUpper"        , "$p2 TestIsUpper"        ],
-"isLower",        ["$p1 TestIsLower"        , "$p2 TestIsLower"        ],      
-"isDigit",        ["$p1 TestIsDigit"        , "$p2 TestIsDigit"        ],      
-"isSpace",        ["$p1 TestIsSpace"        , "$p2 TestIsSpace"        ],      
-"isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ],
-"isPrint",        ["$p1 TestIsPrint"        , "$p2 TestIsPrint"        ],     
-"isControl",      ["$p1 TestIsControl"      , "$p2 TestIsControl"      ],
-"toLower",        ["$p1 TestToLower"        , "$p2 TestToLower"        ],     
-"toUpper",        ["$p1 TestToUpper"        , "$p2 TestToUpper"        ],     
-"isWhiteSpace",   ["$p1 TestIsWhiteSpace"   , "$p2 TestIsWhiteSpace"   ],
+    "isAlpha",        ["$p1 TestIsAlpha"        , "$p2 TestIsAlpha"        ],
+    "isUpper",        ["$p1 TestIsUpper"        , "$p2 TestIsUpper"        ],
+    "isLower",        ["$p1 TestIsLower"        , "$p2 TestIsLower"        ],
+    "isDigit",        ["$p1 TestIsDigit"        , "$p2 TestIsDigit"        ],
+    "isSpace",        ["$p1 TestIsSpace"        , "$p2 TestIsSpace"        ],
+    "isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ],
+    "isPrint",        ["$p1 TestIsPrint"        , "$p2 TestIsPrint"        ],
+    "isControl",      ["$p1 TestIsControl"      , "$p2 TestIsControl"      ],
+    "toLower",        ["$p1 TestToLower"        , "$p2 TestToLower"        ],
+    "toUpper",        ["$p1 TestToUpper"        , "$p2 TestToUpper"        ],
+    "isWhiteSpace",   ["$p1 TestIsWhiteSpace"   , "$p2 TestIsWhiteSpace"   ],
 };
 
 runTests($options, $tests, $dataFiles);