README.txt
1© 2016 and later: Unicode, Inc. and others.
2License & terms of use: http://www.unicode.org/copyright.html
3Copyright (C) 2012, International Business Machines Corporation and others. All Rights Reserved.
4
5README for ICU4J Performance Test
6
7This directory includes a number of performance tests. Most are
8comparing ICU operations with built in Java functions. Many tests run
9numerous iterations with a variety of locales.
10
11Several tests create .html output files that can be opened and viewed in a web browser.
12
13The collation test produces output in the terminal window. Some are executed
14individually via command line and others run via an `ant` command.
15
16Note: Tests with "_r" in the name are obsolete tests that compared
17versions of ICU4J with each other. These may be useful in the future,
18but require reworking to locate, compile, and run different versions.
19
20
21Note: To run the performance test for ICU4J as a part of continuous build, you will
22need to set up Perl with the following modules:
23 a) Statistics/Distributions.pm
24 b) Statistics/Descriptive.pm
25 c) XML/LibXML.pm
26
27CONTINUOUS BUILD:
28 To run a set of performance tests defined in file perlftests.pl, use these commands:
29 cd <icu_root>/icu4j
30 mvn install -DskipTests -DskipITs
31 cd perf-tests
32 ... run tests from here ...
33
34Output is created in perf.xml. This output contains results comparing ICU and JDK for the
35following operations
36 DateFmt-open
37 DateFmt-parse
38 NumFmt-open
39 NumFnt-parse
40 Collation in several locales
41
42COLLATION TESTS
43 The collation tests run only on the command line with tabular output:
44 perl collationperf.pl |& tee collation_output.txt
45
46
47OTHER COMMAND LINE TESTS
48Additional tests are run from the command line, each producing an HTML
49output file with with the name "perf" followed by a timestamp of when
50it was run. For example:
51
52 "perf Jul 22 141434.html"
53
54Each result can be loaded for review in a browser.
55
56SETUP:
57The environment variable PERL5LIB must be set as follows:
58 export PERL5LIB=`pwd`
59
60Then the command line is run for each as follows:
61 perl dateformatperf.pl
62 perl converterperf.pl
63 perl decimalformat.pl
64 perl normperf.pl
65 perl ucharacterperf.pl
66 perl unicodesetperf.pl
67
68
69converterperf compares ICU Decoder and ICU Encoder with JDK versions for timing.
70
71decimalformatperf compares JDK with ICU in contruction, parsing, and
72formatting in en_US and de_DE locales.
73
74normperf tests various normalization methods in both JKD and ICU usign
75a variety of locales
76
77ucharacterperf compares JDK with ICU for character handling with
78digits, numeric values, types of characters, casing, and other
79attributes
80
81unicodesetperf compares UnicodeSet with HashSet with the following:
82 UnicodeSetAdd
83 HashSetAdd
84 UnicodSetContains
85 HashSetContains
86 UnicodeSetIterate
87 HashSetIterate
88