summaryrefslogtreecommitdiff
path: root/icu4j/perf-tests
diff options
context:
space:
mode:
authorVictor Chang <vichang@google.com>2021-11-19 12:02:07 +0000
committerVictor Chang <vichang@google.com>2021-11-26 11:23:18 +0000
commitd64b374ca20c6956e9b5408b0ac778ad72190b76 (patch)
treea635e9e017d0460992fee167a339dd6e6acfdd8a /icu4j/perf-tests
parent6f34992bd76b556b0509e7b6d2b006384e227be8 (diff)
downloadicu-d64b374ca20c6956e9b5408b0ac778ad72190b76.tar.gz
Copy ICU release-70-1 into aosp/icu70
Copy the files with the following commands: find icu4j/ -type f,d ! -regex ".*/\(Android.mk\|Android.bp\|adjust_icudt_path.mk\|liblayout-jarjar-rules.txt\|.gitignore\|AndroidTest.xml\)" -delete find icu4c/ -type f,d ! -regex ".*/\(Android.mk\|Android.bp\|.gitignore\|AndroidTest.xml\)" -delete cp -r ${UPSTREAM_ICU_GIT}/icu4j . cp -r ${UPSTREAM_ICU_GIT}/icu4c . git checkout HEAD -- icu4c/.gitignore icu4j/.gitignore rm -r tools/cldr cp -r ${UPSTREAM_ICU_GIT}/tools/cldr tools/cldr Change-Id: I231541e82e34b9c50b20552cfb6ba80e11046810
Diffstat (limited to 'icu4j/perf-tests')
-rw-r--r--icu4j/perf-tests/Dataset.pm2
-rw-r--r--icu4j/perf-tests/README.txt82
-rwxr-xr-xicu4j/perf-tests/collationperf.pl2
-rwxr-xr-xicu4j/perf-tests/converterperf.pl98
-rwxr-xr-xicu4j/perf-tests/dateformatperf.pl4
-rwxr-xr-xicu4j/perf-tests/decimalformatperf.pl4
-rwxr-xr-xicu4j/perf-tests/normperf.pl8
-rwxr-xr-xicu4j/perf-tests/perftests.pl4
-rw-r--r--icu4j/perf-tests/perldriver/Dataset.pm2
-rw-r--r--icu4j/perf-tests/perldriver/PerfFramework4j.pm2
-rw-r--r--icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/CollationPerformanceTest.java2
-rw-r--r--icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/PerfTest.java6
-rwxr-xr-xicu4j/perf-tests/ucharacterperf.pl4
-rwxr-xr-xicu4j/perf-tests/unicodesetperf.pl4
14 files changed, 157 insertions, 67 deletions
diff --git a/icu4j/perf-tests/Dataset.pm b/icu4j/perf-tests/Dataset.pm
index 69cc2a8b0..0c502f2e4 100644
--- a/icu4j/perf-tests/Dataset.pm
+++ b/icu4j/perf-tests/Dataset.pm
@@ -61,7 +61,7 @@ sub getMean {
}
# Return a 99% error based on the t distribution. The dataset
-# is desribed as getMean() +/- getError().
+# is described as getMean() +/- getError().
sub getError {
my $self = shift;
return $self->{_error} * $self->{_scale};
diff --git a/icu4j/perf-tests/README.txt b/icu4j/perf-tests/README.txt
index e20444db9..b20f0b879 100644
--- a/icu4j/perf-tests/README.txt
+++ b/icu4j/perf-tests/README.txt
@@ -4,7 +4,81 @@ Copyright (C) 2012, International Business Machines Corporation and others. All
README for ICU4J Performance Test
-Please note that to run the performance test for ICU4J as a part of continuous build, you will need to setup Perl with the following modules:
- a) Statistics/Distribution.pm
- b) Statistics/Descriptive.pm
- c) XML/LibXML.pm
+This directory includes a number of performance tests. Most are
+comparing ICU operations with built in Java functions. Many tests run
+numerous iterations with a variety of locales.
+
+Several tests create .html output files that can be opened and viewed in a web browser.
+
+The collation test produces output in the terminal window. Some are executed
+individually via command line and others run via an `ant` command.
+
+Note: Tests with "_r" in the name are obsolete tests that compared
+versions of ICU4J with each other. These may be useful in the future,
+but require reworking to locate, compile, and run different versions.
+
+
+Note: To run the performance test for ICU4J as a part of continuous build, you will
+need to set up Perl with the following modules:
+ a) Statistics/Distribution.pm
+ b) Statistics/Descriptive.pm
+ c) XML/LibXML.pm
+
+CONTINUOUS BUILD:
+ To run a set of performance tests defined in file perlftests.pl, use this command:
+ ant continuous-build
+
+Output is created in perf.xml. This output contains results comparing ICU and JDK for the
+following operations
+ DateFmt-open
+ DateFmt-parse
+ NumFmt-open
+ NumFnt-parse
+ Collation in several locales
+
+COLLATION TESTS
+ The collation tests run only on the command line with tabular output:
+ perl collationperf.pl |& tee collation_output.txt
+
+
+OTHER COMMAND LINE TESTS
+Additional tests are run from the command line, each producing an HTML
+output file with with the name "perf" followed by a timestamp of when
+it was run. For example:
+
+ "perf Jul 22 141434.html"
+
+Each result can be loaded for review in a browser.
+
+SETUP:
+The environment variable PERL5LIB must be set as follows:
+ export PERL5LIB=`pwd`
+
+Then the command line is run for each as follows:
+ perl dateformatperf.pl
+ perl converterperf.pl
+ perl decimalformat.pl
+ perl normperf.pl
+ perl ucharacterperf.pl
+ perl unicodesetperf.pl
+
+
+converterperf compares ICU Decoder and ICU Encoder with JDK versions for timing.
+
+decimalformatperf compares JDK with ICU in contruction, parsing, and
+formatting in en_US and de_DE locales.
+
+normperf tests various normalization methods in both JKD and ICU usign
+a variety of locales
+
+ucharacterperf compares JDK with ICU for character handling with
+digits, numeric values, types of characters, casing, and other
+attributes
+
+unicodesetperf compares UnicodeSet with HashSet with the following:
+ UnicodeSetAdd
+ HashSetAdd
+ UnicodSetContains
+ HashSetContains
+ UnicodeSetIterate
+ HashSetIterate
diff --git a/icu4j/perf-tests/collationperf.pl b/icu4j/perf-tests/collationperf.pl
index 8af6fbbc9..cc7396bd4 100755
--- a/icu4j/perf-tests/collationperf.pl
+++ b/icu4j/perf-tests/collationperf.pl
@@ -47,7 +47,7 @@ if ($^O eq "MSWin32") {
#
# Outer loop runs through the locales to test
-# (Edit this list dirctly to make changes)
+# (Edit this list directly to make changes)
#
foreach $locale (
"en_US",
diff --git a/icu4j/perf-tests/converterperf.pl b/icu4j/perf-tests/converterperf.pl
index 27e03c997..8e6703648 100755
--- a/icu4j/perf-tests/converterperf.pl
+++ b/icu4j/perf-tests/converterperf.pl
@@ -8,7 +8,7 @@
use strict;
-# Assume we are running within the icu4j root directory
+# Assume we are running within the icu4j/perf-tests root directory
use lib 'src/com/ibm/icu/dev/test/perf';
use Dataset;
@@ -16,8 +16,11 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.ConverterPerformanceTest';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar:../icu4j-charset.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
+# Some tests do not compile at this time.
my @METHODS = (
## ['TestByteToCharConverter', 'TestByteToCharConverterICU'],
## ['TestCharToByteConverter', 'TestCharToByteConverterICU'],
@@ -27,33 +30,34 @@ my @METHODS = (
# Patterns which define the set of characters used for testing.
-my $SOURCEDIR ="src/com/ibm/icu/dev/test/perf/data/conversion/";
+my $SOURCEDIR ="./data/conversion/";
+# Note that some tests are unavailable
my @OPTIONS = (
-# src text src encoding test encoding
- [ "arabic.txt", "UTF-8", "csisolatinarabic"],
- [ "french.txt", "UTF-8", "csisolatin1"],
- [ "greek.txt", "UTF-8", "csisolatingreek"],
- [ "hebrew.txt", "UTF-8", "csisolatinhebrew"],
-# [ "hindi.txt" , "UTF-8", "iscii"],
- [ "japanese.txt", "UTF-8", "EUC-JP"],
-# [ "japanese.txt", "UTF-8", "csiso2022jp"],
- [ "japanese.txt", "UTF-8", "shift_jis"],
-# [ "korean.txt", "UTF-8", "csiso2022kr"],
- [ "korean.txt", "UTF-8", "EUC-KR"],
- [ "s-chinese.txt", "UTF-8", "EUC_CN"],
- [ "arabic.txt", "UTF-8", "UTF-8"],
- [ "french.txt", "UTF-8", "UTF-8"],
- [ "greek.txt", "UTF-8", "UTF-8"],
- [ "hebrew.txt", "UTF-8", "UTF-8"],
- [ "hindi.txt" , "UTF-8", "UTF-8"],
- [ "japanese.txt", "UTF-8", "UTF-8"],
- [ "korean.txt", "UTF-8", "UTF-8"],
- [ "s-chinese.txt", "UTF-8", "UTF-8"],
- [ "french.txt", "UTF-8", "UTF-16BE"],
- [ "french.txt", "UTF-8", "UTF-16LE"],
- [ "english.txt", "UTF-8", "US-ASCII"],
- );
+# src text src encoding test encoding
+ [ "arabic.txt", "UTF-8", "csisolatinarabic"],
+ [ "french.txt", "UTF-8", "csisolatin1"],
+ [ "greek.txt", "UTF-8", "csisolatingreek"],
+ [ "hebrew.txt", "UTF-8", "csisolatinhebrew"],
+# [ "hindi.txt" , "UTF-8", "iscii"],
+ [ "japanese.txt", "UTF-8", "EUC-JP"],
+ [ "japanese.txt", "UTF-8", "csiso2022jp"],
+# [ "japanese.txt", "UTF-8", "shift_jis"],
+ [ "korean.txt", "UTF-8", "csiso2022kr"],
+# [ "korean.txt", "UTF-8", "EUC-KR"],
+ [ "s-chinese.txt", "UTF-8", "EUC_CN"],
+ [ "arabic.txt", "UTF-8", "UTF-8"],
+ [ "french.txt", "UTF-8", "UTF-8"],
+ [ "greek.txt", "UTF-8", "UTF-8"],
+ [ "hebrew.txt", "UTF-8", "UTF-8"],
+ [ "hindi.txt" , "UTF-8", "UTF-8"],
+ [ "japanese.txt", "UTF-8", "UTF-8"],
+ [ "korean.txt", "UTF-8", "UTF-8"],
+ [ "s-chinese.txt", "UTF-8", "UTF-8"],
+ [ "french.txt", "UTF-8", "UTF-16BE"],
+ [ "french.txt", "UTF-8", "UTF-16LE"],
+ [ "english.txt", "UTF-8", "US-ASCII"],
+ );
my $CALIBRATE = 2; # duration in seconds for initial calibration
my $DURATION = 10; # duration in seconds for each pass
@@ -108,7 +112,7 @@ EOF
print HTML "<P><TABLE $TABLEATTR><TR><TD>\n";
print HTML "<P><B>$testMethod vs. $baselineMethod</B></P>\n";
-
+
print HTML "<P><TABLE $TABLEATTR BGCOLOR=\"#CCFFFF\">\n";
print HTML "<TR><TD>Options</TD><TD>$testMethod</TD>";
print HTML "<TD>$baselineMethod</TD><TD>Ratio</TD></TR>\n";
@@ -213,17 +217,19 @@ sub measure2 {
sub measure1 {
my $method = shift;
my $pat = shift;
- my $iterCount = shift; # actually might be -seconds/pass
+ my $param3 = shift; # Either -seconds/pass or iteration count
+
+ my $iterCount = 0; # Set later based on param3.
out("<P>Measuring $method for input file @$pat[0] for encoding @$pat[2] , ");
- if ($iterCount > 0) {
+ if ($param3 > 0) {
+ $iterCount = $param3;
out("$iterCount iterations/pass, $NUMPASSES passes</P>\n");
} else {
- out(-$iterCount, " seconds/pass, $NUMPASSES passes</P>\n");
- }
+ my $timePerPass = -$param3;
+ out(-$timePerPass, " seconds/pass, $NUMPASSES passes</P>\n");
- # is $iterCount actually -seconds/pass?
- if ($iterCount < 0) {
+ # Value given was -seconds/pass
# calibrate: estimate ms/iteration
print "Calibrating...";
@@ -234,16 +240,16 @@ sub measure1 {
$data[0] *= 1.0e+3;
my $timePerIter = 1.0e-3 * $data[0] / $data[1];
-
- # determine iterations/pass
- $iterCount = int(-$iterCount / $timePerIter + 0.5);
-
+
+ # determine iterations/pass from timePerPass and timePerIteration
+ $iterCount = int($timePerPass / $timePerIter + 0.5);
+
out("<P>Calibration pass ($CALIBRATE sec): ");
out("$data[0] ms, ");
out("$data[1] iterations = ");
out(formatSeconds(4, $timePerIter), "/iteration<BR>\n");
}
-
+
# run passes
print "Measuring $iterCount iterations x $NUMPASSES passes...";
my @t = callJava($method, $pat, $iterCount, $NUMPASSES);
@@ -291,11 +297,11 @@ sub callJava {
my $pat = shift;
my $n = shift;
my $passes = shift;
-
+
my $fileName = $SOURCEDIR.@$pat[0] ;
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
-
- my $cmd = "java -classpath classes $TESTCLASS $method $n -p $passes -f $fileName -e @$pat[1] -T @$pat[2]";
+
+ my $cmd = "java -classpath $CLASSES $TESTCLASS $method $n -p $passes -f $fileName -e @$pat[1] -T @$pat[2]";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;
@@ -406,7 +412,7 @@ sub formatNumber {
my $mult = shift;
my $a = shift;
my $delta = shift; # may be undef
-
+
my $result = formatSigDig($sigdig, $a*$mult);
if (defined($delta)) {
my $d = formatSigDig($sigdig, $delta*$mult);
@@ -441,13 +447,13 @@ sub formatSeconds {
my $a = shift;
my $delta = shift; # may be undef
- my @MULT = (1 , 1e3, 1e6, 1e9);
- my @SUFF = ('s' , 'ms', 'us', 'ns');
+ my @MULT = (1 , 1e3, 1e6, 1e9, 1e12);
+ my @SUFF = ('s' , 'ms', 'us', 'ns', 'ps');
# Determine our scale
my $i = 0;
++$i while ($a*$MULT[$i] < 1 && $i < @MULT);
-
+
formatNumber($sigdig, $MULT[$i], $a, $delta) . ' ' . $SUFF[$i];
}
@@ -465,7 +471,7 @@ sub formatPercent {
my $sigdig = shift;
my $a = shift;
my $delta = shift; # may be undef
-
+
formatNumber($sigdig, 100, $a, $delta) . ' %';
}
diff --git a/icu4j/perf-tests/dateformatperf.pl b/icu4j/perf-tests/dateformatperf.pl
index b4ebe6897..be24ce075 100755
--- a/icu4j/perf-tests/dateformatperf.pl
+++ b/icu4j/perf-tests/dateformatperf.pl
@@ -16,6 +16,8 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.DateFormatPerformanceTest';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
my @METHODS = (
@@ -281,7 +283,7 @@ sub callJava {
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
- my $cmd = "java -classpath classes $TESTCLASS $method $n -p $passes -L @$pat[0] \"@$pat[1]\" \"@$pat[2]\" -r $THREADS";
+ my $cmd = "java -classpath $CLASSES $TESTCLASS $method $n -p $passes -L @$pat[0] \"@$pat[1]\" \"@$pat[2]\" -r $THREADS";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;
diff --git a/icu4j/perf-tests/decimalformatperf.pl b/icu4j/perf-tests/decimalformatperf.pl
index a9852cde2..685adaf7f 100755
--- a/icu4j/perf-tests/decimalformatperf.pl
+++ b/icu4j/perf-tests/decimalformatperf.pl
@@ -16,6 +16,8 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.DecimalFormatPerformanceTest';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
my @METHODS = (
@@ -276,7 +278,7 @@ sub callJava {
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
- my $cmd = "java -classpath classes $TESTCLASS $method $n -p $passes -L @$pat[0] \"@$pat[1]\" \"@$pat[2]\" -r $THREADS";
+ my $cmd = "java -classpath $CLASSES $TESTCLASS $method $n -p $passes -L @$pat[0] \"@$pat[1]\" \"@$pat[2]\" -r $THREADS";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;
diff --git a/icu4j/perf-tests/normperf.pl b/icu4j/perf-tests/normperf.pl
index 3bfba5f68..3c05c53c9 100755
--- a/icu4j/perf-tests/normperf.pl
+++ b/icu4j/perf-tests/normperf.pl
@@ -16,6 +16,8 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.NormalizerPerformanceTest';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
my @METHODS = (
@@ -30,7 +32,7 @@ my @METHODS = (
# Patterns which define the set of characters used for testing.
-my $SOURCEDIR ="src/com/ibm/icu/dev/test/perf/data/collation/";
+my $SOURCEDIR ="data/collation/";
my @OPTIONS = (
# src text src encoding mode
@@ -88,7 +90,7 @@ my @OPTIONS = (
[ "TestNames_SerbianSH.txt", "UTF-8", "l"],
[ "TestNames_SerbianSR.txt", "UTF-8", "l"],
[ "TestNames_Thai.txt", "UTF-8", "l"],
- [ "Testnames_Russian.txt", "UTF-8", "l"],
+ [ "TestNames_Russian.txt", "UTF-8", "l"],
);
my $CALIBRATE = 2; # duration in seconds for initial calibration
@@ -331,7 +333,7 @@ sub callJava {
my $fileName = $SOURCEDIR . @$pat[0] ;
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
- my $cmd = "java -classpath classes $TESTCLASS $method $n -p $passes -f $fileName -e @$pat[1] -@$pat[2]";
+ my $cmd = "java -classpath $CLASSES $TESTCLASS $method $n -p $passes -f $fileName -e @$pat[1] -@$pat[2]";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;
diff --git a/icu4j/perf-tests/perftests.pl b/icu4j/perf-tests/perftests.pl
index 0028a8b84..bed179cd4 100755
--- a/icu4j/perf-tests/perftests.pl
+++ b/icu4j/perf-tests/perftests.pl
@@ -9,7 +9,7 @@
use XML::LibXML;
# Assume we are running within the icu4j root directory
-use lib 'src/com/ibm/icu/dev/test/perf';
+use lib '.';
use Dataset;
my $OS=$^O;
@@ -172,7 +172,7 @@ sub main {
);
# Outer loop runs through the locales to test
- # (Edit this list dirctly to make changes)
+ # (Edit this list directly to make changes)
#
foreach $locale (
"en_US",
diff --git a/icu4j/perf-tests/perldriver/Dataset.pm b/icu4j/perf-tests/perldriver/Dataset.pm
index 8188ec935..92262fca2 100644
--- a/icu4j/perf-tests/perldriver/Dataset.pm
+++ b/icu4j/perf-tests/perldriver/Dataset.pm
@@ -62,7 +62,7 @@ sub getMean {
}
# Return a 99% error based on the t distribution. The dataset
-# is desribed as getMean() +/- getError().
+# is described as getMean() +/- getError().
sub getError {
my $self = shift;
return $self->{_error} * $self->{_scale};
diff --git a/icu4j/perf-tests/perldriver/PerfFramework4j.pm b/icu4j/perf-tests/perldriver/PerfFramework4j.pm
index a5bb0923b..2c70967db 100644
--- a/icu4j/perf-tests/perldriver/PerfFramework4j.pm
+++ b/icu4j/perf-tests/perldriver/PerfFramework4j.pm
@@ -141,7 +141,7 @@ sub compareLoop {
my $testCommand = @{ $tests{$i} }[$j];
if ($testCommand =~/--/) {
$custArgs = $& . $'; #The matched part and the right part
- $testCommand = $`; #The left part for furthur processing
+ $testCommand = $`; #The left part for further processing
} else { $custArgs = ''; }
($program, @argsAndTest) = split(/\ /, $testCommand);
my $commandLine;
diff --git a/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/CollationPerformanceTest.java b/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/CollationPerformanceTest.java
index 450a5504b..d8dfceed2 100644
--- a/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/CollationPerformanceTest.java
+++ b/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/CollationPerformanceTest.java
@@ -334,7 +334,7 @@ public class CollationPerformanceTest {
//int opt2 = 0;
for(;;) { //not really a loop, just allows "break" to work, to simplify
- //inadvertantly running more than one test through here
+ //inadvertently running more than one test through here
if(opt_strcmp) {
int r = 0;
startTime = System.currentTimeMillis();
diff --git a/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/PerfTest.java b/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/PerfTest.java
index 33f7a485d..59e878138 100644
--- a/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/PerfTest.java
+++ b/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/PerfTest.java
@@ -35,7 +35,7 @@ import com.ibm.icu.impl.LocaleUtility;
*
* PerfTest.Function testTheName()
*
- * The actual performance test will execute on the returned Commond object
+ * The actual performance test will execute on the returned Command object
* (refer to Command Pattern). To call a test from command line, the 'test'
* prefix of the test method name can be ignored/removed.
*
@@ -43,8 +43,8 @@ import com.ibm.icu.impl.LocaleUtility;
* PerfTest.run() as defined here.
*
* If the subclasses uses any command line arguments (beyond those handled
- * automatically by this calss) then it should override PerfTest.setup() to
- * handle its arguments. If the subclasse needs more sophisticated management
+ * automatically by this class) then it should override PerfTest.setup() to
+ * handle its arguments. If the subclasses needs more sophisticated management
* for controlling finding/calling test method, it can replace the default
* implementation for PerfTest.testProvider before calling PerfTest.run().
*
diff --git a/icu4j/perf-tests/ucharacterperf.pl b/icu4j/perf-tests/ucharacterperf.pl
index b3a0461bf..01fbc9526 100755
--- a/icu4j/perf-tests/ucharacterperf.pl
+++ b/icu4j/perf-tests/ucharacterperf.pl
@@ -16,6 +16,8 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UCharacterPerf';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
my @METHODS = (['JDKDigit', 'Digit'],
@@ -278,7 +280,7 @@ sub callJava {
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
- my $cmd = "java -cp classes $TESTCLASS $method $n -p $passes $pat";
+ my $cmd = "java -cp $CLASSES $TESTCLASS $method $n -p $passes $pat";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;
diff --git a/icu4j/perf-tests/unicodesetperf.pl b/icu4j/perf-tests/unicodesetperf.pl
index 165cb5f44..42138ab5c 100755
--- a/icu4j/perf-tests/unicodesetperf.pl
+++ b/icu4j/perf-tests/unicodesetperf.pl
@@ -16,6 +16,8 @@ use Dataset;
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UnicodeSetPerf';
+my $CLASSES = './out/bin:../tools/misc/out/bin/:../icu4j.jar';
+
# Methods to be tested. Each pair represents a test method and
# a baseline method which is used for comparison.
my @METHODS = (
@@ -268,7 +270,7 @@ sub callJava {
my $n = ($n < 0) ? "-t ".(-$n) : "-i ".$n;
- my $cmd = "java -cp classes $TESTCLASS $method $n -p $passes $pat";
+ my $cmd = "java -cp $CLASSES $TESTCLASS $method $n -p $passes $pat";
print "[$cmd]\n"; # for debugging
open(PIPE, "$cmd|") or die "Can't run \"$cmd\"";
my @out;