• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/perl
2#  ********************************************************************
3#  * COPYRIGHT:
4#  * Copyright (c) 2002-2007, International Business Machines
5#  * Corporation and others. All Rights Reserved.
6#  ********************************************************************
7
8use strict;
9
10#Assume we are running outside of the ICU4J source
11use lib 'svn-icu4j/src/com/ibm/icu/dev/test/perf/perldriver';
12
13use PerfFramework4j;
14
15#---------------------------------------------------------------------
16# Test class
17my $TESTCLASS = 'com.ibm.icu.dev.test.perf.NormalizerPerformanceTest';
18
19my $options = {
20	       "title"=>"Normalization performance regression (ICU4J 3.6 and 3.8)",
21	       "headers"=>"ICU4J36 ICU4J38",
22	       "operationIs"=>"code point",
23	       "timePerOperationIs"=>"Time per code point",
24	       "passes"=>"10",
25	       "time"=>"5",
26	       "outputType"=>"HTML",
27	       "dataDir"=>"C:\\svn-icu4j\\src\\com\\ibm\\icu\\dev\\test\\perf\\data\\collation",
28	       "outputDir"=>"svn-icu4j\\results_ICU4J"
29	      };
30
31# programs
32
33my $jvm1 = "java -cp svn-icu4j_3-6/classes $TESTCLASS -b -e UTF-8";
34my $jvm2 = "java -cp svn-icu4j/classes $TESTCLASS -b -e UTF-8";
35
36my $dataFiles = {
37		 "",
38		 [
39		  "TestNames_Asian.txt",
40		  "TestNames_Chinese.txt",
41		  "TestNames_Japanese.txt",
42		  "TestNames_Japanese_h.txt",
43		  "TestNames_Japanese_k.txt",
44		  "TestNames_Korean.txt",
45		  "TestNames_Latin.txt",
46		  "TestNames_SerbianSH.txt",
47		  "TestNames_SerbianSR.txt",
48		  "TestNames_Thai.txt",
49		  "Testnames_Russian.txt",
50#		  "th18057.txt",
51#		  "thesis.txt",
52#		  "vfear11a.txt",
53		 ]
54		};
55
56
57my $tests = {
58#	     "NFC_NFD_Text",  ["$jvm1 TestICU_NFC_NFD_Text"  ,  "$jvm2 TestICU_NFC_NFD_Text" ],
59	     "NFC_NFC_Text",  ["$jvm1 TestICU_NFC_NFC_Text"  ,  "$jvm2 TestICU_NFC_NFC_Text" ],
60	     "NFC_Orig_Text", ["$jvm1 TestICU_NFC_Orig_Text" ,  "$jvm2 TestICU_NFC_Orig_Text"],
61	     "NFD_NFD_Text",  ["$jvm1 TestICU_NFD_NFD_Text"  ,  "$jvm2 TestICU_NFD_NFD_Text" ],
62	     "NFD_NFC_Text",  ["$jvm1 TestICU_NFD_NFC_Text"  ,  "$jvm2 TestICU_NFD_NFC_Text" ],
63	     "NFD_Orig_Text", ["$jvm1 TestICU_NFD_Orig_Text" ,  "$jvm2 TestICU_NFD_Orig_Text"],
64	     ##
65	     "QC_NFC_NFD_Text",  ["$jvm1 TestQC_NFC_NFD_Text"  ,  "$jvm2 TestQC_NFC_NFD_Text" ],
66	     "QC_NFC_NFC_Text",  ["$jvm1 TestQC_NFC_NFC_Text"  ,  "$jvm2 TestQC_NFC_NFC_Text" ],
67	     "QC_NFC_Orig_Text", ["$jvm1 TestQC_NFC_Orig_Text" ,  "$jvm2 TestQC_NFC_Orig_Text"],
68	     "QC_NFD_NFD_Text",  ["$jvm1 TestQC_NFD_NFD_Text"  ,  "$jvm2 TestQC_NFD_NFD_Text" ],
69	     "QC_NFD_NFC_Text",  ["$jvm1 TestQC_NFD_NFC_Text"  ,  "$jvm2 TestQC_NFD_NFC_Text" ],
70	     "QC_NFD_Orig_Text", ["$jvm1 TestQC_NFD_Orig_Text" ,  "$jvm2 TestQC_NFD_Orig_Text"],
71	     ##
72	     "IsNormalized_NFC_NFD_Text",  ["$jvm1 TestIsNormalized_NFC_NFD_Text"  ,  "$jvm2 TestIsNormalized_NFC_NFD_Text" ],
73	     "IsNormalized_NFC_NFC_Text",  ["$jvm1 TestIsNormalized_NFC_NFC_Text"  ,  "$jvm2 TestIsNormalized_NFC_NFC_Text" ],
74	     "IsNormalized_NFC_Orig_Text", ["$jvm1 TestIsNormalized_NFC_Orig_Text" ,  "$jvm2 TestIsNormalized_NFC_Orig_Text"],
75	     "IsNormalized_NFD_NFD_Text",  ["$jvm1 TestIsNormalized_NFD_NFD_Text"  ,  "$jvm2 TestIsNormalized_NFD_NFD_Text" ],
76	     "IsNormalized_NFD_NFC_Text",  ["$jvm1 TestIsNormalized_NFD_NFC_Text"  ,  "$jvm2 TestIsNormalized_NFD_NFC_Text" ],
77	     "IsNormalized_NFD_Orig_Text", ["$jvm1 TestIsNormalized_NFD_Orig_Text" ,  "$jvm2 TestIsNormalized_NFD_Orig_Text"]
78	    };
79
80
81runTests($options, $tests, $dataFiles);
82
83
84