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/Distribution.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 this command: 29 ant continuous-build 30 31Output is created in perf.xml. This output contains results comparing ICU and JDK for the 32following operations 33 DateFmt-open 34 DateFmt-parse 35 NumFmt-open 36 NumFnt-parse 37 Collation in several locales 38 39COLLATION TESTS 40 The collation tests run only on the command line with tabular output: 41 perl collationperf.pl |& tee collation_output.txt 42 43 44OTHER COMMAND LINE TESTS 45Additional tests are run from the command line, each producing an HTML 46output file with with the name "perf" followed by a timestamp of when 47it was run. For example: 48 49 "perf Jul 22 141434.html" 50 51Each result can be loaded for review in a browser. 52 53SETUP: 54The environment variable PERL5LIB must be set as follows: 55 export PERL5LIB=`pwd` 56 57Then the command line is run for each as follows: 58 perl dateformatperf.pl 59 perl converterperf.pl 60 perl decimalformat.pl 61 perl normperf.pl 62 perl ucharacterperf.pl 63 perl unicodesetperf.pl 64 65 66converterperf compares ICU Decoder and ICU Encoder with JDK versions for timing. 67 68decimalformatperf compares JDK with ICU in contruction, parsing, and 69formatting in en_US and de_DE locales. 70 71normperf tests various normalization methods in both JKD and ICU usign 72a variety of locales 73 74ucharacterperf compares JDK with ICU for character handling with 75digits, numeric values, types of characters, casing, and other 76attributes 77 78unicodesetperf compares UnicodeSet with HashSet with the following: 79 UnicodeSetAdd 80 HashSetAdd 81 UnicodSetContains 82 HashSetContains 83 UnicodeSetIterate 84 HashSetIterate 85