summaryrefslogtreecommitdiff
path: root/icu4j/perf-tests/README.txt
blob: b20f0b8796e449d125221b53514d66e066263f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
© 2016 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
Copyright (C) 2012, International Business Machines Corporation and others.  All Rights Reserved.

README for ICU4J Performance Test

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