Home | History | Annotate | Download | only in perf-tests
      1 #!/usr/bin/perl
      2 #  ********************************************************************
      3 #  * COPYRIGHT:
      4 #  *  2016 and later: Unicode, Inc. and others.
      5 #  * License & terms of use: http://www.unicode.org/copyright.html#License
      6 #  * Copyright (c) 2002-2007, International Business Machines
      7 #  * Corporation and others. All Rights Reserved.
      8 #  ********************************************************************
      9 
     10 use strict;
     11 
     12 use lib 'svn-icu4j/src/com/ibm/icu/dev/test/perf/perldriver';
     13 
     14 use PerfFramework4j;
     15 
     16 my $options = {
     17 	       "title"=>"Rule Based BreakIterator performance regression (ICU4J 3.6 and 3.8)",
     18 	       "headers"=>"ICU4J36 ICU4J38",
     19 	       "operationIs"=>"code point",
     20 	       "eventIs"=>"break",
     21 	       "passes"=>"10",
     22 	       "time"=>"5",
     23 	       "outputType"=>"HTML",
     24 	       "dataDir"=>"svn-icu4j/src/com/ibm/icu/dev/test/perf/data/collation",
     25 	       "outputDir"=>"svn-icu4j/results_ICU4J"
     26 	      };
     27 
     28 # programs
     29 # Test class
     30 my $TESTCLASS = "com.ibm.icu.dev.test.perf.RBBIPerf";
     31 # tests will be done for all the programs. Results will be stored and connected
     32 my $m1 = "char";
     33 my $m2 = "word";
     34 my $m3 = "line";
     35 my $m4 = "jdkline";
     36 
     37 my $m;
     38 
     39 if(@_ >= 0) {
     40   $m = "-- -m ".shift;
     41 } else {
     42   $m = $m1;
     43 }
     44 
     45 my $jvm1 = "java -classpath svn-icu4j_3-6/classes $TESTCLASS";
     46 my $jvm2 = "java -classpath svn-icu4j/classes $TESTCLASS";
     47 
     48 my $dataFiles = {
     49 "en", [
     50 	   #"thesis.txt", 
     51        #"2drvb10.txt", 
     52        #"ulyss10.txt",  
     53        #"nvsbl10.txt", 
     54        #"vfear11a.txt", 		  
     55        "TestNames_Asian.txt",
     56        "TestNames_Chinese.txt",
     57        "TestNames_Japanese.txt",
     58        "TestNames_Japanese_h.txt",
     59        "TestNames_Japanese_k.txt",
     60        "TestNames_Korean.txt",
     61        "TestNames_Latin.txt",
     62        "TestNames_SerbianSH.txt",
     63        "TestNames_SerbianSR.txt",
     64        "TestNames_Thai.txt",
     65        "Testnames_Russian.txt",
     66 ],
     67 #"th", ["TestNames_Thai.txt", "th18057.txt"]
     68 };
     69 
     70 
     71 my $tests = { 
     72 "TestNextChar",      ["$jvm1 testRBBINext $m1", "$jvm2 testRBBINext $m1"],
     73 "TestNextWord",      ["$jvm1 testRBBINext $m2", "$jvm2 testRBBINext $m2"],
     74 "TestNextLine",      ["$jvm1 testRBBINext $m3", "$jvm2 testRBBINext $m3"],
     75 "TestNextJDKLine",   ["$jvm1 testRBBINext $m4", "$jvm2 testRBBINext $m4"],
     76 ##
     77 "TestPreviousChar",      ["$jvm1 testRBBIPrevious $m1", "$jvm2 testRBBIPrevious $m1"],
     78 "TestPreviousWord",      ["$jvm1 testRBBIPrevious $m2", "$jvm2 testRBBIPrevious $m2"],
     79 "TestPreviousLine",      ["$jvm1 testRBBIPrevious $m3", "$jvm2 testRBBIPrevious $m3"],
     80 #"TestPreviousSentence",  ["$jvm1 testRBBIPrevious $m4", "$jvm2 testRBBIPrevious $m4"],
     81 ##						                                                     
     82 "TestIsBoundaryChar",      ["$jvm1 testRBBIIsBoundary $m1", "$jvm2 testRBBIIsBoundary $m1"],
     83 "TestIsBoundaryWord",      ["$jvm1 testRBBIIsBoundary $m2", "$jvm2 testRBBIIsBoundary $m2"],
     84 "TestIsBoundaryLine",      ["$jvm1 testRBBIIsBoundary $m3", "$jvm2 testRBBIIsBoundary $m3"],
     85 #"TestIsBoundarySentence",  ["$jvm1 testRBBIIsBoundary $m4", "$jvm2 testRBBIIsBoundary $m4"],
     86 };
     87 
     88 runTests($options, $tests, $dataFiles);
     89 
     90 
     91