Home | History | Annotate | Download | only in normperf
      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) 2002-2013, International Business Machines
      9 #  * Corporation and others. All Rights Reserved.
     10 #  ********************************************************************
     11 
     12 #use strict;
     13 
     14 require "../perldriver/Common.pl";
     15 
     16 use lib '../perldriver';
     17 
     18 use PerfFramework;
     19 
     20 my $options = {
     21     "title"=>"Normalization performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
     22     "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
     23     "operationIs"=>"code point",
     24     "timePerOperationIs"=>"Time per code point",
     25     "passes"=>"10",
     26     "time"=>"5",
     27     #"outputType"=>"HTML",
     28     "dataDir"=>$CollationDataPath,
     29     "outputDir"=>"../results"
     30 };
     31 
     32 # programs
     33 
     34 my $p1; # Previous
     35 my $p2; # Latest
     36 
     37 if ($OnWindows) {
     38     $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/normperf/$WindowsPlatform/Release/normperf.exe";
     39     $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/normperf/$WindowsPlatform/Release/normperf.exe";
     40 } else {
     41     $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/normperf/normperf";
     42     $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/normperf/normperf";
     43 }
     44 
     45 my $dataFiles = {
     46     "",
     47     [
     48         "TestNames_Asian.txt",
     49         "TestNames_Chinese.txt",
     50         "TestNames_Japanese.txt",
     51         "TestNames_Japanese_h.txt",
     52         "TestNames_Japanese_k.txt",
     53         "TestNames_Korean.txt",
     54         "TestNames_Latin.txt",
     55         "TestNames_SerbianSH.txt",
     56         "TestNames_SerbianSR.txt",
     57         "TestNames_Thai.txt",
     58         "Testnames_Russian.txt",
     59         "th18057.txt",
     60         "thesis.txt",
     61         "vfear11a.txt",
     62     ]
     63 };
     64 
     65 
     66 my $tests = { 
     67     "NFC_NFD_Text",  ["$p1,TestICU_NFC_NFD_Text"  ,  "$p2,TestICU_NFC_NFD_Text" ],
     68     "NFC_NFC_Text",  ["$p1,TestICU_NFC_NFC_Text"  ,  "$p2,TestICU_NFC_NFC_Text" ],
     69     "NFC_Orig_Text", ["$p1,TestICU_NFC_Orig_Text" ,  "$p2,TestICU_NFC_Orig_Text"],
     70     "NFD_NFD_Text",  ["$p1,TestICU_NFD_NFD_Text"  ,  "$p2,TestICU_NFD_NFD_Text" ],
     71     "NFD_NFC_Text",  ["$p1,TestICU_NFD_NFC_Text"  ,  "$p2,TestICU_NFD_NFC_Text" ],
     72     "NFD_Orig_Text", ["$p1,TestICU_NFD_Orig_Text" ,  "$p2,TestICU_NFD_Orig_Text"],
     73     ##
     74     "QC_NFC_NFD_Text",  ["$p1,TestQC_NFC_NFD_Text"  ,  "$p2,TestQC_NFC_NFD_Text" ],
     75     "QC_NFC_NFC_Text",  ["$p1,TestQC_NFC_NFC_Text"  ,  "$p2,TestQC_NFC_NFC_Text" ],
     76     "QC_NFC_Orig_Text", ["$p1,TestQC_NFC_Orig_Text" ,  "$p2,TestQC_NFC_Orig_Text"],
     77     "QC_NFD_NFD_Text",  ["$p1,TestQC_NFD_NFD_Text"  ,  "$p2,TestQC_NFD_NFD_Text" ],
     78     "QC_NFD_NFC_Text",  ["$p1,TestQC_NFD_NFC_Text"  ,  "$p2,TestQC_NFD_NFC_Text" ],
     79     "QC_NFD_Orig_Text", ["$p1,TestQC_NFD_Orig_Text" ,  "$p2,TestQC_NFD_Orig_Text"],
     80     ##
     81     "IsNormalized_NFC_NFD_Text",  ["$p1,TestIsNormalized_NFC_NFD_Text"  ,  "$p2,TestIsNormalized_NFC_NFD_Text" ],
     82     "IsNormalized_NFC_NFC_Text",  ["$p1,TestIsNormalized_NFC_NFC_Text"  ,  "$p2,TestIsNormalized_NFC_NFC_Text" ],
     83     "IsNormalized_NFC_Orig_Text", ["$p1,TestIsNormalized_NFC_Orig_Text" ,  "$p2,TestIsNormalized_NFC_Orig_Text"],
     84     "IsNormalized_NFD_NFD_Text",  ["$p1,TestIsNormalized_NFD_NFD_Text"  ,  "$p2,TestIsNormalized_NFD_NFD_Text" ],
     85     "IsNormalized_NFD_NFC_Text",  ["$p1,TestIsNormalized_NFD_NFC_Text"  ,  "$p2,TestIsNormalized_NFD_NFC_Text" ],
     86     "IsNormalized_NFD_Orig_Text", ["$p1,TestIsNormalized_NFD_Orig_Text" ,  "$p2,TestIsNormalized_NFD_Orig_Text"]
     87 };
     88 
     89 
     90 runTests($options, $tests, $dataFiles);
     91 
     92 
     93