]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/ustrperf/StringPerf_r.pl
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / ustrperf / StringPerf_r.pl
CommitLineData
46f4442e
A
1#!/usr/bin/perl
2# ********************************************************************
3# * COPYRIGHT:
57a6839d 4# * Copyright (c) 2002-2013, International Business Machines
46f4442e
A
5# * Corporation and others. All Rights Reserved.
6# ********************************************************************
7
8#use strict;
9
10use lib '../perldriver';
11
12require "../perldriver/Common.pl";
13
14use PerfFramework;
15
16my $options = {
57a6839d
A
17 "title"=>"Unicode String performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
18 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
19 "operationIs"=>"Unicode String",
20 "passes"=>"10",
21 "time"=>"5",
22 #"outputType"=>"HTML",
23 "dataDir"=>$CollationDataPath,
24 "outputDir"=>"../results"
25};
46f4442e
A
26
27# programs
28
29my $p1; # Previous
30my $p2; # Latest
31
32if ($OnWindows) {
57a6839d
A
33 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/ustrperf/$WindowsPlatform/Release/stringperf.exe -b -u"; # Previous
34 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/ustrperf/$WindowsPlatform/Release/stringperf.exe -b -u"; # Latest
46f4442e 35} else {
57a6839d
A
36 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/ustrperf/stringperf -b -u"; # Previous
37 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/ustrperf/stringperf -b -u"; # Latest
46f4442e
A
38}
39
40my $dataFiles = {
57a6839d
A
41 "",
42 [
43 "TestNames_Asian.txt",
44 "TestNames_Chinese.txt",
45 "TestNames_Japanese.txt",
46 "TestNames_Japanese_h.txt",
47 "TestNames_Japanese_k.txt",
48 "TestNames_Korean.txt",
49 "TestNames_Latin.txt",
50 "TestNames_SerbianSH.txt",
51 "TestNames_SerbianSR.txt",
52 "TestNames_Thai.txt",
53 "Testnames_Russian.txt",
54 "th18057.txt",
55 "thesis.txt",
56 "vfear11a.txt",
57 ]
58};
46f4442e
A
59
60
61my $tests = {
57a6839d
A
62 "Object Construction(empty string)", ["$p1,TestCtor" , "$p2,TestCtor" ],
63 "Object Construction(single char)", ["$p1,TestCtor1" , "$p2,TestCtor1" ],
64 "Object Construction(another string)", ["$p1,TestCtor2" , "$p2,TestCtor2" ],
65 "Object Construction(string literal)", ["$p1,TestCtor3" , "$p2,TestCtor3" ],
66 "String Assignment(helper)", ["$p1,TestAssign" , "$p2,TestAssign" ],
67 "String Assignment(string literal)", ["$p1,TestAssign1" , "$p2,TestAssign1" ],
68 "String Assignment(another string)", ["$p1,TestAssign2" , "$p2,TestAssign2" ],
69 "Get String or Character", ["$p1,TestGetch" , "$p2,TestGetch" ],
70 "Concatenation", ["$p1,TestCatenate" , "$p2,TestCatenate" ],
71 "String Scanning(char)", ["$p1,TestScan" , "$p2,TestScan" ],
72 "String Scanning(string)", ["$p1,TestScan1" , "$p2,TestScan1" ],
73 "String Scanning(char set)", ["$p1,TestScan2" , "$p2,TestScan2" ],
46f4442e
A
74};
75
76
77runTests($options, $tests, $dataFiles);
78
79