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