ucharacterperf_r.pl revision 2d2bb24f747c65578da13d5b13b82f0669690461
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
10use strict;
11
12#Assume we are running outside of the ICU4J source
13use lib 'svn-icu4j/src/com/ibm/icu/dev/test/perf/perldriver';
14
15use PerfFramework4j;
16
17#---------------------------------------------------------------------
18# Test class
19my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UCharacterPerf';
20
21my $options = {
22	       "title"=>"UnicodeCharacter Property performance regression (ICU4J 3.6 and 3.8)",
23	       "headers"=>"ICU4J36 ICU4J38",
24	       "operationIs"=>"code point",
25	       "timePerOperationIs"=>"Time per code point",
26	       "passes"=>"10",
27	       "time"=>"5",
28	       "outputType"=>"HTML",
29	       "dataDir"=>"svn-icu4j/src/com/ibm/icu/dev/test/perf/data/collation",
30	       "outputDir"=>"svn-icu4j/results_ICU4J"
31	      };
32
33# programs
34
35my $jvm1 = "java -classpath svn-icu4j/classes $TESTCLASS";
36my $jvm2 = "java -classpath svn-icu4j_3-6/classes $TESTCLASS";
37
38my $dataFiles = "";
39my $pat = '0 ffff';
40
41my $tests = {
42	     "Digit ($pat)",                     ["$jvm1 Digit $pat"  ,                     "$jvm2 Digit $pat" ],
43	     "GetNumericValue ($pat)",           ["$jvm1 GetNumericValue $pat"  ,           "$jvm2 GetNumericValue $pat" ],
44	     "GetType ($pat)",                   ["$jvm1 GetType $pat"  ,                   "$jvm2 GetType $pat" ],
45	     "IsDefined ($pat)",                 ["$jvm1 IsDefined $pat"  ,                 "$jvm2 IsDefined $pat" ],
46	     "IsDigit ($pat)",                   ["$jvm1 IsDigit $pat"  ,                   "$jvm2 IsDigit $pat" ],
47	     "IsIdentifierIgnorable ($pat)",     ["$jvm1 IsIdentifierIgnorable $pat"  ,     "$jvm2 IsIdentifierIgnorable $pat" ],
48	     "IsISOControl ($pat)",              ["$jvm1 IsISOControl $pat"  ,              "$jvm2 IsISOControl $pat" ],
49	     "IsLetter ($pat)",                  ["$jvm1 IsLetter $pat"  ,                  "$jvm2 IsLetter $pat" ],
50	     "IsLetterOrDigit ($pat)",           ["$jvm1 IsLetterOrDigit $pat"  ,           "$jvm2 IsLetterOrDigit $pat" ],
51	     "IsLowerCase ($pat)",               ["$jvm1 IsLowerCase $pat"  ,               "$jvm2 IsLowerCase $pat" ],
52	     "IsSpaceChar ($pat)",               ["$jvm1 IsSpaceChar $pat"  ,               "$jvm2 IsSpaceChar $pat" ],
53	     "IsTitleCase ($pat)",               ["$jvm1 IsTitleCase $pat"  ,               "$jvm2 IsTitleCase $pat" ],
54	     "IsUnicodeIdentifierPart ($pat)",   ["$jvm1 IsUnicodeIdentifierPart $pat"  ,   "$jvm2 IsUnicodeIdentifierPart $pat" ],
55	     "IsUnicodeIdentifierStart ($pat)",  ["$jvm1 IsUnicodeIdentifierStart $pat"  ,  "$jvm2 IsUnicodeIdentifierStart $pat" ],
56	     "IsUpperCase ($pat)",               ["$jvm1 IsUpperCase $pat"  ,               "$jvm2 IsUpperCase $pat" ],
57	     "IsWhiteSpace ($pat)",              ["$jvm1 IsWhiteSpace $pat"  ,              "$jvm2 IsWhiteSpace $pat" ]
58	    };
59
60
61runTests($options, $tests, $dataFiles);
62
63
64