]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/test/perf/charperf/CharPerf_r.pl
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / charperf / CharPerf_r.pl
... / ...
CommitLineData
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
9# * Corporation and others. All Rights Reserved.
10# ********************************************************************
11
12#use strict;
13
14require "../perldriver/Common.pl";
15
16use lib '../perldriver';
17
18use PerfFramework;
19
20my $options = {
21 "title"=>"Character property performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
22 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
23 "operationIs"=>"code point",
24 "timePerOperationIs"=>"Time per code point",
25 "passes"=>"10",
26 "time"=>"5",
27 #"outputType"=>"HTML",
28 "dataDir"=>"Not Using Data Files",
29 "outputDir"=>"../results"
30};
31
32# programs
33
34my $p1; # Previous
35my $p2; # Latest
36if ($OnWindows) {
37 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/charperf/$WindowsPlatform/Release/charperf.exe";
38 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe";
39} else {
40 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/charperf/charperf";
41 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf";
42}
43
44my $dataFiles = "";
45
46my $tests = {
47 "isAlpha", ["$p1 TestIsAlpha" , "$p2 TestIsAlpha" ],
48 "isUpper", ["$p1 TestIsUpper" , "$p2 TestIsUpper" ],
49 "isLower", ["$p1 TestIsLower" , "$p2 TestIsLower" ],
50 "isDigit", ["$p1 TestIsDigit" , "$p2 TestIsDigit" ],
51 "isSpace", ["$p1 TestIsSpace" , "$p2 TestIsSpace" ],
52 "isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ],
53 "isPrint", ["$p1 TestIsPrint" , "$p2 TestIsPrint" ],
54 "isControl", ["$p1 TestIsControl" , "$p2 TestIsControl" ],
55 "toLower", ["$p1 TestToLower" , "$p2 TestToLower" ],
56 "toUpper", ["$p1 TestToUpper" , "$p2 TestToUpper" ],
57 "isWhiteSpace", ["$p1 TestIsWhiteSpace" , "$p2 TestIsWhiteSpace" ],
58};
59
60runTests($options, $tests, $dataFiles);
61
62