File: CharPerf.pl

package info (click to toggle)
icu 78.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 123,988 kB
  • sloc: cpp: 527,891; ansic: 112,789; sh: 4,983; makefile: 4,657; perl: 3,199; python: 2,933; xml: 749; sed: 36; lisp: 12
file content (59 lines) | stat: -rwxr-xr-x 2,360 bytes parent folder | download | duplicates (12)
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
#!/usr/bin/perl
#  ********************************************************************
#  * Copyright (C) 2016 and later: Unicode, Inc. and others.
#  * License & terms of use: http://www.unicode.org/copyright.html
#  ********************************************************************
#  ********************************************************************
#  * COPYRIGHT:
#  * Copyright (c) 2002-2013, International Business Machines Corporation and
#  * others. All Rights Reserved.
#  ********************************************************************


#use strict;

require "../perldriver/Common.pl";

use lib '../perldriver';

use PerfFramework;

my $options = {
    "title"=>"Character property performance: ICU".$ICULatestVersion." vs. STDLib",
    "headers"=>"StdLib ICU".$ICULatestVersion,
    "operationIs"=>"code point",
    "timePerOperationIs"=>"Time per code point",
    "passes"=>"10",
    "time"=>"5",
    #"outputType"=>"HTML",
    "dataDir"=>"Not Using Data Files",
    "outputDir"=>"../results"
};


# programs
# tests will be done for all the programs. Results will be stored and connected
my $p;
if ($OnWindows) {
    $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe";
} else {
    $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf";
}

my $tests = { 
    "isAlpha",        ["$p,TestStdLibIsAlpha"        , "$p,TestIsAlpha"        ],
    "isUpper",        ["$p,TestStdLibIsUpper"        , "$p,TestIsUpper"        ],
    "isLower",        ["$p,TestStdLibIsLower"        , "$p,TestIsLower"        ],
    "isDigit",        ["$p,TestStdLibIsDigit"        , "$p,TestIsDigit"        ],
    "isSpace",        ["$p,TestStdLibIsSpace"        , "$p,TestIsSpace"        ],
    "isAlphaNumeric", ["$p,TestStdLibIsAlphaNumeric" , "$p,TestIsAlphaNumeric" ],
    "isPrint",        ["$p,TestStdLibIsPrint"        , "$p,TestIsPrint"        ],
    "isControl",      ["$p,TestStdLibIsControl"      , "$p,TestIsControl"      ],
    "toLower",        ["$p,TestStdLibToLower"        , "$p,TestToLower"        ],
    "toUpper",        ["$p,TestStdLibToUpper"        , "$p,TestToUpper"        ],
    "isWhiteSpace",   ["$p,TestStdLibIsWhiteSpace"   , "$p,TestIsWhiteSpace"   ],
};

my $dataFiles;

runTests($options, $tests, $dataFiles);