]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/charperf/CharPerf.pl
ICU-64243.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / charperf / CharPerf.pl
1 #!/usr/bin/perl
2 # ********************************************************************
3 # * Copyright (C) 2016 and later: Unicode, Inc. and others.
4 # * License & terms of use: http://www.unicode.org/copyright.html#License
5 # ********************************************************************
6 # ********************************************************************
7 # * COPYRIGHT:
8 # * Copyright (c) 2002-2013, International Business Machines Corporation and
9 # * others. All Rights Reserved.
10 # ********************************************************************
11
12
13 #use strict;
14
15 require "../perldriver/Common.pl";
16
17 use lib '../perldriver';
18
19 use PerfFramework;
20
21 my $options = {
22 "title"=>"Character property performance: ICU".$ICULatestVersion." vs. STDLib",
23 "headers"=>"StdLib ICU".$ICULatestVersion,
24 "operationIs"=>"code point",
25 "timePerOperationIs"=>"Time per code point",
26 "passes"=>"10",
27 "time"=>"5",
28 #"outputType"=>"HTML",
29 "dataDir"=>"Not Using Data Files",
30 "outputDir"=>"../results"
31 };
32
33
34 # programs
35 # tests will be done for all the programs. Results will be stored and connected
36 my $p;
37 if ($OnWindows) {
38 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe";
39 } else {
40 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf";
41 }
42
43 my $tests = {
44 "isAlpha", ["$p,TestStdLibIsAlpha" , "$p,TestIsAlpha" ],
45 "isUpper", ["$p,TestStdLibIsUpper" , "$p,TestIsUpper" ],
46 "isLower", ["$p,TestStdLibIsLower" , "$p,TestIsLower" ],
47 "isDigit", ["$p,TestStdLibIsDigit" , "$p,TestIsDigit" ],
48 "isSpace", ["$p,TestStdLibIsSpace" , "$p,TestIsSpace" ],
49 "isAlphaNumeric", ["$p,TestStdLibIsAlphaNumeric" , "$p,TestIsAlphaNumeric" ],
50 "isPrint", ["$p,TestStdLibIsPrint" , "$p,TestIsPrint" ],
51 "isControl", ["$p,TestStdLibIsControl" , "$p,TestIsControl" ],
52 "toLower", ["$p,TestStdLibToLower" , "$p,TestToLower" ],
53 "toUpper", ["$p,TestStdLibToUpper" , "$p,TestToUpper" ],
54 "isWhiteSpace", ["$p,TestStdLibIsWhiteSpace" , "$p,TestIsWhiteSpace" ],
55 };
56
57 my $dataFiles;
58
59 runTests($options, $tests, $dataFiles);