ICU-5658 add performance regression scripts

X-SVN-Rev: 21310
This commit is contained in:
Ram Viswanadha 2007-03-21 22:47:41 +00:00
parent d03898325d
commit a8704e0a37
6 changed files with 379 additions and 0 deletions

5
.gitattributes vendored
View File

@ -117,6 +117,11 @@ icu4j/src/com/ibm/icu/dev/test/perf/data/collation/TestNames_SerbianSH.txt -text
icu4j/src/com/ibm/icu/dev/test/perf/data/collation/TestNames_SerbianSR.txt -text
icu4j/src/com/ibm/icu/dev/test/perf/data/collation/TestNames_Simplified_Chinese.txt -text
icu4j/src/com/ibm/icu/dev/test/perf/data/collation/TestNames_Thai.txt -text
icu4j/src/com/ibm/icu/dev/test/perf/normalizationperf_r_b.pl -text
icu4j/src/com/ibm/icu/dev/test/perf/normalizationperf_r_l.pl -text
icu4j/src/com/ibm/icu/dev/test/perf/rbbiperf_r.pl -text
icu4j/src/com/ibm/icu/dev/test/perf/ucharacterperf_r.pl -text
icu4j/src/com/ibm/icu/dev/test/perf/unicodesetperf_r.pl -text
icu4j/src/com/ibm/icu/dev/test/rbbi/rbbitst.txt -text
icu4j/src/com/ibm/icu/dev/test/serializable/data/ICU_3.6/com.ibm.icu.impl.JDKTimeZone.dat -text
icu4j/src/com/ibm/icu/dev/test/serializable/data/ICU_3.6/com.ibm.icu.impl.OlsonTimeZone.dat -text

View File

@ -0,0 +1,83 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
use strict;
#Assume we are running outside of the ICU4J source
use lib './icu4jsrc_3_0/src/com/ibm/icu/dev/test/perf/perldriver';
use PerfFramework4j;
#---------------------------------------------------------------------
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.NormalizerPerformanceTest';
my $options = {
"title"=>"Normalization performance regression (ICU4J 3.2 and 3.4)",
"headers"=>"ICU4J32 ICU4J34",
"operationIs"=>"code point",
"timePerOperationIs"=>"Time per code point",
"passes"=>"10",
"time"=>"5",
#"outputType"=>"HTML",
"dataDir"=>"c:\\src\\perf\\data",
"outputDir"=>"results_ICU4J"
};
# programs
my $jvm1 = "java -cp ./icu4jsrc_3_2/icu4j32.jar;./icu4jsrc_3_2/perf32.jar $TESTCLASS -b -e UTF-8";
my $jvm2 = "java -cp ./icu4jsrc_3_4/icu4j34.jar;./icu4jsrc_3_4/perf34.jar $TESTCLASS -b -e UTF-8";
my $dataFiles = {
"",
[
"TestNames_Asian.txt",
"TestNames_Chinese.txt",
"TestNames_Japanese.txt",
"TestNames_Japanese_h.txt",
"TestNames_Japanese_k.txt",
"TestNames_Korean.txt",
"TestNames_Latin.txt",
"TestNames_SerbianSH.txt",
"TestNames_SerbianSR.txt",
"TestNames_Thai.txt",
"Testnames_Russian.txt",
# "th18057.txt",
# "thesis.txt",
# "vfear11a.txt",
]
};
my $tests = {
# "NFC_NFD_Text", ["$jvm1 TestICU_NFC_NFD_Text" , "$jvm2 TestICU_NFC_NFD_Text" ],
"NFC_NFC_Text", ["$jvm1 TestICU_NFC_NFC_Text" , "$jvm2 TestICU_NFC_NFC_Text" ],
"NFC_Orig_Text", ["$jvm1 TestICU_NFC_Orig_Text" , "$jvm2 TestICU_NFC_Orig_Text"],
"NFD_NFD_Text", ["$jvm1 TestICU_NFD_NFD_Text" , "$jvm2 TestICU_NFD_NFD_Text" ],
"NFD_NFC_Text", ["$jvm1 TestICU_NFD_NFC_Text" , "$jvm2 TestICU_NFD_NFC_Text" ],
"NFD_Orig_Text", ["$jvm1 TestICU_NFD_Orig_Text" , "$jvm2 TestICU_NFD_Orig_Text"],
##
"QC_NFC_NFD_Text", ["$jvm1 TestQC_NFC_NFD_Text" , "$jvm2 TestQC_NFC_NFD_Text" ],
"QC_NFC_NFC_Text", ["$jvm1 TestQC_NFC_NFC_Text" , "$jvm2 TestQC_NFC_NFC_Text" ],
"QC_NFC_Orig_Text", ["$jvm1 TestQC_NFC_Orig_Text" , "$jvm2 TestQC_NFC_Orig_Text"],
"QC_NFD_NFD_Text", ["$jvm1 TestQC_NFD_NFD_Text" , "$jvm2 TestQC_NFD_NFD_Text" ],
"QC_NFD_NFC_Text", ["$jvm1 TestQC_NFD_NFC_Text" , "$jvm2 TestQC_NFD_NFC_Text" ],
"QC_NFD_Orig_Text", ["$jvm1 TestQC_NFD_Orig_Text" , "$jvm2 TestQC_NFD_Orig_Text"],
##
"IsNormalized_NFC_NFD_Text", ["$jvm1 TestIsNormalized_NFC_NFD_Text" , "$jvm2 TestIsNormalized_NFC_NFD_Text" ],
"IsNormalized_NFC_NFC_Text", ["$jvm1 TestIsNormalized_NFC_NFC_Text" , "$jvm2 TestIsNormalized_NFC_NFC_Text" ],
"IsNormalized_NFC_Orig_Text", ["$jvm1 TestIsNormalized_NFC_Orig_Text" , "$jvm2 TestIsNormalized_NFC_Orig_Text"],
"IsNormalized_NFD_NFD_Text", ["$jvm1 TestIsNormalized_NFD_NFD_Text" , "$jvm2 TestIsNormalized_NFD_NFD_Text" ],
"IsNormalized_NFD_NFC_Text", ["$jvm1 TestIsNormalized_NFD_NFC_Text" , "$jvm2 TestIsNormalized_NFD_NFC_Text" ],
"IsNormalized_NFD_Orig_Text", ["$jvm1 TestIsNormalized_NFD_Orig_Text" , "$jvm2 TestIsNormalized_NFD_Orig_Text"]
};
runTests($options, $tests, $dataFiles);

View File

@ -0,0 +1,83 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
use strict;
#Assume we are running outside of the ICU4J source
use lib './icu4jsrc_3_4/src/com/ibm/icu/dev/test/perf/perldriver';
use PerfFramework4j;
#---------------------------------------------------------------------
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.NormalizerPerformanceTest';
my $options = {
"title"=>"Normalization performance regression (ICU4J 3.2 and 3.4)",
"headers"=>"ICU4J32 ICU4J34",
"operationIs"=>"code point",
"timePerOperationIs"=>"Time per code point",
"passes"=>"10",
"time"=>"5",
#"outputType"=>"HTML",
"dataDir"=>"c:\\src\\perf\\data",
"outputDir"=>"results_ICU4J"
};
# programs
my $jvm1 = "java -cp ./icu4jsrc_3_2/icu4j32.jar;./icu4jsrc_3_2/perf32.jar $TESTCLASS -l -e UTF-8";
my $jvm2 = "java -cp ./icu4jsrc_3_4/icu4j34.jar;./icu4jsrc_3_4/perf34.jar $TESTCLASS -l -e UTF-8";
my $dataFiles = {
"",
[
"TestNames_Asian.txt",
"TestNames_Chinese.txt",
"TestNames_Japanese.txt",
"TestNames_Japanese_h.txt",
"TestNames_Japanese_k.txt",
"TestNames_Korean.txt",
"TestNames_Latin.txt",
"TestNames_SerbianSH.txt",
"TestNames_SerbianSR.txt",
"TestNames_Thai.txt",
"Testnames_Russian.txt",
# "th18057.txt",
# "thesis.txt",
# "vfear11a.txt",
]
};
my $tests = {
"NFC_NFD_Text", ["$jvm1 TestICU_NFC_NFD_Text" , "$jvm2 TestICU_NFC_NFD_Text" ],
"NFC_NFC_Text", ["$jvm1 TestICU_NFC_NFC_Text" , "$jvm2 TestICU_NFC_NFC_Text" ],
"NFC_Orig_Text", ["$jvm1 TestICU_NFC_Orig_Text" , "$jvm2 TestICU_NFC_Orig_Text"],
"NFD_NFD_Text", ["$jvm1 TestICU_NFD_NFD_Text" , "$jvm2 TestICU_NFD_NFD_Text" ],
"NFD_NFC_Text", ["$jvm1 TestICU_NFD_NFC_Text" , "$jvm2 TestICU_NFD_NFC_Text" ],
"NFD_Orig_Text", ["$jvm1 TestICU_NFD_Orig_Text" , "$jvm2 TestICU_NFD_Orig_Text"],
##
"QC_NFC_NFD_Text", ["$jvm1 TestQC_NFC_NFD_Text" , "$jvm2 TestQC_NFC_NFD_Text" ],
"QC_NFC_NFC_Text", ["$jvm1 TestQC_NFC_NFC_Text" , "$jvm2 TestQC_NFC_NFC_Text" ],
"QC_NFC_Orig_Text", ["$jvm1 TestQC_NFC_Orig_Text" , "$jvm2 TestQC_NFC_Orig_Text"],
"QC_NFD_NFD_Text", ["$jvm1 TestQC_NFD_NFD_Text" , "$jvm2 TestQC_NFD_NFD_Text" ],
"QC_NFD_NFC_Text", ["$jvm1 TestQC_NFD_NFC_Text" , "$jvm2 TestQC_NFD_NFC_Text" ],
"QC_NFD_Orig_Text", ["$jvm1 TestQC_NFD_Orig_Text" , "$jvm2 TestQC_NFD_Orig_Text"],
##
"IsNormalized_NFC_NFD_Text", ["$jvm1 TestIsNormalized_NFC_NFD_Text" , "$jvm2 TestIsNormalized_NFC_NFD_Text" ],
"IsNormalized_NFC_NFC_Text", ["$jvm1 TestIsNormalized_NFC_NFC_Text" , "$jvm2 TestIsNormalized_NFC_NFC_Text" ],
"IsNormalized_NFC_Orig_Text", ["$jvm1 TestIsNormalized_NFC_Orig_Text" , "$jvm2 TestIsNormalized_NFC_Orig_Text"],
"IsNormalized_NFD_NFD_Text", ["$jvm1 TestIsNormalized_NFD_NFD_Text" , "$jvm2 TestIsNormalized_NFD_NFD_Text" ],
"IsNormalized_NFD_NFC_Text", ["$jvm1 TestIsNormalized_NFD_NFC_Text" , "$jvm2 TestIsNormalized_NFD_NFC_Text" ],
"IsNormalized_NFD_Orig_Text", ["$jvm1 TestIsNormalized_NFD_Orig_Text" , "$jvm2 TestIsNormalized_NFD_Orig_Text"]
};
runTests($options, $tests, $dataFiles);

View File

@ -0,0 +1,88 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
use strict;
use lib './icu4jsrc_3_4/src/com/ibm/icu/dev/test/perf/perldriver';
use PerfFramework4j;
my $options = {
"title"=>"Rule Based BreakIterator performance regression (ICU4J 3.2 and 3.4)",
"headers"=>"ICU4J32 ICU4J34",
"operationIs"=>"code point",
"eventIs"=>"break",
"passes"=>"10",
"time"=>"5",
#"outputType"=>"HTML",
"dataDir"=>"c:/src/perf/data",
"outputDir"=>"./results_ICU4J"
};
# programs
# Test class
my $TESTCLASS = "com.ibm.icu.dev.test.perf.RBBIPerf";
# tests will be done for all the programs. Results will be stored and connected
my $m1 = "char";
my $m2 = "word";
my $m3 = "line";
my $m4 = "jdkline";
my $m;
if(@_ >= 0) {
$m = "-- -m ".shift;
} else {
$m = $m1;
}
my $jvm1 = "java -cp ./icu4jsrc_3_2/icu4j32.jar;./icu4jsrc_3_2/perf32.jar; $TESTCLASS";
my $jvm2 = "java -cp ./icu4jsrc_3_4/icu4j34.jar;./icu4jsrc_3_4/perf34.jar; $TESTCLASS";
my $dataFiles = {
"en", [
#"thesis.txt",
#"2drvb10.txt",
#"ulyss10.txt",
#"nvsbl10.txt",
#"vfear11a.txt",
"TestNames_Asian.txt",
"TestNames_Chinese.txt",
"TestNames_Japanese.txt",
"TestNames_Japanese_h.txt",
"TestNames_Japanese_k.txt",
"TestNames_Korean.txt",
"TestNames_Latin.txt",
"TestNames_SerbianSH.txt",
"TestNames_SerbianSR.txt",
"TestNames_Thai.txt",
"Testnames_Russian.txt",
],
#"th", ["TestNames_Thai.txt", "th18057.txt"]
};
my $tests = {
"TestNextChar", ["$jvm1 testRBBINext $m1", "$jvm2 testRBBINext $m1"],
"TestNextWord", ["$jvm1 testRBBINext $m2", "$jvm2 testRBBINext $m2"],
"TestNextLine", ["$jvm1 testRBBINext $m3", "$jvm2 testRBBINext $m3"],
"TestNextJDKLine", ["$jvm1 testRBBINext $m4", "$jvm2 testRBBINext $m4"],
##
"TestPreviousChar", ["$jvm1 testRBBIPrevious $m1", "$jvm2 testRBBIPrevious $m1"],
"TestPreviousWord", ["$jvm1 testRBBIPrevious $m2", "$jvm2 testRBBIPrevious $m2"],
"TestPreviousLine", ["$jvm1 testRBBIPrevious $m3", "$jvm2 testRBBIPrevious $m3"],
#"TestPreviousSentence", ["$jvm1 testRBBIPrevious $m4", "$jvm2 testRBBIPrevious $m4"],
##
"TestIsBoundaryChar", ["$jvm1 testRBBIIsBoundary $m1", "$jvm2 testRBBIIsBoundary $m1"],
"TestIsBoundaryWord", ["$jvm1 testRBBIIsBoundary $m2", "$jvm2 testRBBIIsBoundary $m2"],
"TestIsBoundaryLine", ["$jvm1 testRBBIIsBoundary $m3", "$jvm2 testRBBIIsBoundary $m3"],
#"TestIsBoundarySentence", ["$jvm1 testRBBIIsBoundary $m4", "$jvm2 testRBBIIsBoundary $m4"],
};
runTests($options, $tests, $dataFiles);

View File

@ -0,0 +1,61 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
use strict;
#Assume we are running outside of the ICU4J source
use lib './icu4jsrc_3_4/src/com/ibm/icu/dev/test/perf/perldriver';
use PerfFramework4j;
#---------------------------------------------------------------------
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UCharacterPerf';
my $options = {
"title"=>"UnicodeCharacter Property performance regression (ICU4J 3.2 and 3.4)",
"headers"=>"ICU4J32 ICU4J34",
"operationIs"=>"code point",
"timePerOperationIs"=>"Time per code point",
"passes"=>"10",
"time"=>"5",
#"outputType"=>"HTML",
"dataDir"=>"c:\\src\\perf\\data",
"outputDir"=>"results_ICU4J"
};
# programs
my $jvm1 = "java -cp ./icu4jsrc_3_2/icu4j32.jar;./icu4jsrc_3_2/perf32.jar $TESTCLASS";
my $jvm2 = "java -cp ./icu4jsrc_3_4/icu4j34.jar;./icu4jsrc_3_4/perf34.jar $TESTCLASS";
my $dataFiles = "";
my $pat = '0 ffff';
my $tests = {
"Digit ($pat)", ["$jvm1 Digit $pat" , "$jvm2 Digit $pat" ],
"GetNumericValue ($pat)", ["$jvm1 GetNumericValue $pat" , "$jvm2 GetNumericValue $pat" ],
"GetType ($pat)", ["$jvm1 GetType $pat" , "$jvm2 GetType $pat" ],
"IsDefined ($pat)", ["$jvm1 IsDefined $pat" , "$jvm2 IsDefined $pat" ],
"IsDigit ($pat)", ["$jvm1 IsDigit $pat" , "$jvm2 IsDigit $pat" ],
"IsIdentifierIgnorable ($pat)", ["$jvm1 IsIdentifierIgnorable $pat" , "$jvm2 IsIdentifierIgnorable $pat" ],
"IsISOControl ($pat)", ["$jvm1 IsISOControl $pat" , "$jvm2 IsISOControl $pat" ],
"IsLetter ($pat)", ["$jvm1 IsLetter $pat" , "$jvm2 IsLetter $pat" ],
"IsLetterOrDigit ($pat)", ["$jvm1 IsLetterOrDigit $pat" , "$jvm2 IsLetterOrDigit $pat" ],
"IsLowerCase ($pat)", ["$jvm1 IsLowerCase $pat" , "$jvm2 IsLowerCase $pat" ],
"IsSpaceChar ($pat)", ["$jvm1 IsSpaceChar $pat" , "$jvm2 IsSpaceChar $pat" ],
"IsTitleCase ($pat)", ["$jvm1 IsTitleCase $pat" , "$jvm2 IsTitleCase $pat" ],
"IsUnicodeIdentifierPart ($pat)", ["$jvm1 IsUnicodeIdentifierPart $pat" , "$jvm2 IsUnicodeIdentifierPart $pat" ],
"IsUnicodeIdentifierStart ($pat)", ["$jvm1 IsUnicodeIdentifierStart $pat" , "$jvm2 IsUnicodeIdentifierStart $pat" ],
"IsUpperCase ($pat)", ["$jvm1 IsUpperCase $pat" , "$jvm2 IsUpperCase $pat" ],
"IsWhiteSpace ($pat)", ["$jvm1 IsWhiteSpace $pat" , "$jvm2 IsWhiteSpace $pat" ]
};
runTests($options, $tests, $dataFiles);

View File

@ -0,0 +1,59 @@
#!/usr/bin/perl
# ********************************************************************
# * COPYRIGHT:
# * Copyright (c) 2002, International Business Machines Corporation and
# * others. All Rights Reserved.
# ********************************************************************
use strict;
#Assume we are running outside of the ICU4J source
use lib './icu4jsrc_3_4/src/com/ibm/icu/dev/test/perf/perldriver';
use PerfFramework4j;
#---------------------------------------------------------------------
# Test class
my $TESTCLASS = 'com.ibm.icu.dev.test.perf.UnicodeSetPerf';
my $options = {
"title"=>"Unicode Set performance regression (ICU4J 3.2 and 3.4)",
"headers"=>"ICU4J32 ICU4J34",
"operationIs"=>"code point",
"timePerOperationIs"=>"Time per code point",
"passes"=>"10",
"time"=>"5",
#"outputType"=>"HTML",
"dataDir"=>"c:\\src\\perf\\data",
"outputDir"=>"results_ICU4J"
};
# programs
my $jvm1 = "java -cp ./icu4jsrc_3_2/icu4j32.jar;./icu4jsrc_3_2/perf32.jar $TESTCLASS";
my $jvm2 = "java -cp ./icu4jsrc_3_4/icu4j34.jar;./icu4jsrc_3_4/perf34.jar $TESTCLASS";
my $dataFiles = "";
my $pat1 = '[:Lt:]';
my $pat2 = '[:Cn:]';
my $tests = {
"UnicodeSetAdd ($pat1)", ["$jvm1 UnicodeSetAdd $pat1" , "$jvm2 UnicodeSetAdd $pat1" ],
"UnicodeSetAdd ($pat2)", ["$jvm1 UnicodeSetAdd $pat2" , "$jvm2 UnicodeSetAdd $pat2" ],
"UnicodeSetContains ($pat1)", ["$jvm1 UnicodeSetContains $pat1" , "$jvm2 UnicodeSetContains $pat1" ],
"UnicodeSetContains ($pat2)", ["$jvm1 UnicodeSetContains $pat2" , "$jvm2 UnicodeSetContains $pat2" ],
"UnicodeSetIterate ($pat1)", ["$jvm1 UnicodeSetIterate $pat1" , "$jvm2 UnicodeSetIterate $pat1" ],
"UnicodeSetIterate ($pat2)", ["$jvm1 UnicodeSetIterate $pat2" , "$jvm2 UnicodeSetIterate $pat2" ],
##
"HashSetAdd ($pat1)", ["$jvm1 HashSetAdd $pat1" , "$jvm2 HashSetAdd $pat1" ],
"HashSetAdd ($pat2)", ["$jvm1 HashSetAdd $pat2" , "$jvm2 HashSetAdd $pat2" ],
"HashSetContains ($pat1)", ["$jvm1 HashSetContains $pat1" , "$jvm2 HashSetContains $pat1" ],
"HashSetContains ($pat2)", ["$jvm1 HashSetContains $pat2" , "$jvm2 HashSetContains $pat2" ],
"HashSetIterate ($pat1)", ["$jvm1 HashSetIterate $pat1" , "$jvm2 HashSetIterate $pat1" ],
"HashSetIterate ($pat2)", ["$jvm1 HashSetIterate $pat2" , "$jvm2 HashSetIterate $pat2" ]
};
runTests($options, $tests, $dataFiles);