1 #!/usr/bin/perl 2 # ******************************************************************** 3 # * COPYRIGHT: 4 # * Copyright (c) 2002-2007, International Business Machines 5 # * Corporation and others. All Rights Reserved. 6 # ******************************************************************** 7 8 use strict; 9 10 #Assume we are running outside of the ICU4J source 11 use lib 'svn-icu4j/src/com/ibm/icu/dev/test/perf/perldriver'; 12 13 use PerfFramework4j; 14 15 #--------------------------------------------------------------------- 16 # Test class 17 my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UnicodeSetPerf'; 18 19 my $options = { 20 "title"=>"Unicode Set 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"=>"svn-icu4j/src/com/ibm/icu/dev/test/perf/data/collation", 28 "outputDir"=>"svn-icu4j/results_ICU4J" 29 }; 30 31 # programs 32 33 my $jvm1 = "java -classpath svn-icu4j_3-6/classes $TESTCLASS"; 34 my $jvm2 = "java -classpath svn-icu4j/classes $TESTCLASS"; 35 36 my $dataFiles = ""; 37 my $pat1 = '[:Lt:]'; 38 my $pat2 = '[:Cn:]'; 39 40 my $tests = { 41 "UnicodeSetAdd ($pat1)", ["$jvm1 UnicodeSetAdd $pat1" , "$jvm2 UnicodeSetAdd $pat1" ], 42 "UnicodeSetAdd ($pat2)", ["$jvm1 UnicodeSetAdd $pat2" , "$jvm2 UnicodeSetAdd $pat2" ], 43 "UnicodeSetContains ($pat1)", ["$jvm1 UnicodeSetContains $pat1" , "$jvm2 UnicodeSetContains $pat1" ], 44 "UnicodeSetContains ($pat2)", ["$jvm1 UnicodeSetContains $pat2" , "$jvm2 UnicodeSetContains $pat2" ], 45 "UnicodeSetIterate ($pat1)", ["$jvm1 UnicodeSetIterate $pat1" , "$jvm2 UnicodeSetIterate $pat1" ], 46 "UnicodeSetIterate ($pat2)", ["$jvm1 UnicodeSetIterate $pat2" , "$jvm2 UnicodeSetIterate $pat2" ], 47 ## 48 "HashSetAdd ($pat1)", ["$jvm1 HashSetAdd $pat1" , "$jvm2 HashSetAdd $pat1" ], 49 "HashSetAdd ($pat2)", ["$jvm1 HashSetAdd $pat2" , "$jvm2 HashSetAdd $pat2" ], 50 "HashSetContains ($pat1)", ["$jvm1 HashSetContains $pat1" , "$jvm2 HashSetContains $pat1" ], 51 "HashSetContains ($pat2)", ["$jvm1 HashSetContains $pat2" , "$jvm2 HashSetContains $pat2" ], 52 "HashSetIterate ($pat1)", ["$jvm1 HashSetIterate $pat1" , "$jvm2 HashSetIterate $pat1" ], 53 "HashSetIterate ($pat2)", ["$jvm1 HashSetIterate $pat2" , "$jvm2 HashSetIterate $pat2" ] 54 }; 55 56 57 runTests($options, $tests, $dataFiles); 58 59 60