• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15require "../perldriver/Common.pl";
16
17use lib '../perldriver';
18
19use PerfFramework;
20
21my $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
36my $p;
37if ($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
43my $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
57my $dataFiles;
58
59runTests($options, $tests, $dataFiles);
60