]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/charperf/CharPerf.pl
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / perf / charperf / CharPerf.pl
CommitLineData
46f4442e 1#!/usr/bin/perl
b75a7d8f 2# ********************************************************************
f3c0d7a5
A
3# * Copyright (C) 2016 and later: Unicode, Inc. and others.
4# * License & terms of use: http://www.unicode.org/copyright.html#License
5# ********************************************************************
6# ********************************************************************
b75a7d8f 7# * COPYRIGHT:
57a6839d 8# * Copyright (c) 2002-2013, International Business Machines Corporation and
b75a7d8f
A
9# * others. All Rights Reserved.
10# ********************************************************************
11
12
46f4442e
A
13#use strict;
14
15require "../perldriver/Common.pl";
b75a7d8f
A
16
17use lib '../perldriver';
18
19use PerfFramework;
20
21my $options = {
57a6839d
A
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};
b75a7d8f
A
32
33
34# programs
35# tests will be done for all the programs. Results will be stored and connected
46f4442e
A
36my $p;
37if ($OnWindows) {
57a6839d 38 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe";
46f4442e 39} else {
57a6839d 40 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf";
46f4442e 41}
b75a7d8f
A
42
43my $tests = {
57a6839d
A
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" ],
b75a7d8f
A
55};
56
57my $dataFiles;
58
59runTests($options, $tests, $dataFiles);