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 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.UnicodeSetPerf'; 20 21my $options = { 22 "title"=>"Unicode Set 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_3-6/classes $TESTCLASS"; 36my $jvm2 = "java -classpath svn-icu4j/classes $TESTCLASS"; 37 38my $dataFiles = ""; 39my $pat1 = '[:Lt:]'; 40my $pat2 = '[:Cn:]'; 41 42my $tests = { 43 "UnicodeSetAdd ($pat1)", ["$jvm1 UnicodeSetAdd $pat1" , "$jvm2 UnicodeSetAdd $pat1" ], 44 "UnicodeSetAdd ($pat2)", ["$jvm1 UnicodeSetAdd $pat2" , "$jvm2 UnicodeSetAdd $pat2" ], 45 "UnicodeSetContains ($pat1)", ["$jvm1 UnicodeSetContains $pat1" , "$jvm2 UnicodeSetContains $pat1" ], 46 "UnicodeSetContains ($pat2)", ["$jvm1 UnicodeSetContains $pat2" , "$jvm2 UnicodeSetContains $pat2" ], 47 "UnicodeSetIterate ($pat1)", ["$jvm1 UnicodeSetIterate $pat1" , "$jvm2 UnicodeSetIterate $pat1" ], 48 "UnicodeSetIterate ($pat2)", ["$jvm1 UnicodeSetIterate $pat2" , "$jvm2 UnicodeSetIterate $pat2" ], 49 ## 50 "HashSetAdd ($pat1)", ["$jvm1 HashSetAdd $pat1" , "$jvm2 HashSetAdd $pat1" ], 51 "HashSetAdd ($pat2)", ["$jvm1 HashSetAdd $pat2" , "$jvm2 HashSetAdd $pat2" ], 52 "HashSetContains ($pat1)", ["$jvm1 HashSetContains $pat1" , "$jvm2 HashSetContains $pat1" ], 53 "HashSetContains ($pat2)", ["$jvm1 HashSetContains $pat2" , "$jvm2 HashSetContains $pat2" ], 54 "HashSetIterate ($pat1)", ["$jvm1 HashSetIterate $pat1" , "$jvm2 HashSetIterate $pat1" ], 55 "HashSetIterate ($pat2)", ["$jvm1 HashSetIterate $pat2" , "$jvm2 HashSetIterate $pat2" ] 56 }; 57 58 59runTests($options, $tests, $dataFiles); 60 61 62