]>
Commit | Line | Data |
---|---|---|
46f4442e A |
1 | #!/usr/bin/perl |
2 | # ******************************************************************** | |
3 | # * COPYRIGHT: | |
4 | # * Copyright (c) 2002-2008, International Business Machines | |
5 | # * Corporation and others. All Rights Reserved. | |
6 | # ******************************************************************** | |
7 | ||
8 | #use strict; | |
9 | ||
10 | use lib '../perldriver'; | |
11 | ||
12 | require "../perldriver/Common.pl"; | |
13 | ||
14 | use PerfFramework; | |
15 | ||
16 | my $options = { | |
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 | }; | |
26 | ||
27 | # programs | |
28 | ||
29 | my $p1; # Previous | |
30 | my $p2; # Latest | |
31 | ||
32 | if ($OnWindows) { | |
729e4ab9 A |
33 | $p1 = $ICUPathPrevious."/ustrperf/$WindowsPlatform/Release/stringperf.exe -b -u"; # Previous |
34 | $p2 = $ICUPathLatest."/ustrperf/$WindowsPlatform/Release/stringperf.exe -b -u"; # Latest | |
46f4442e A |
35 | } else { |
36 | $p1 = $ICUPathPrevious."/ustrperf/stringperf -b -u"; # Previous | |
37 | $p2 = $ICUPathLatest."/ustrperf/stringperf -b -u"; # Latest | |
38 | } | |
39 | ||
40 | my $dataFiles = { | |
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 | }; | |
59 | ||
60 | ||
61 | my $tests = { | |
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" ], | |
74 | }; | |
75 | ||
76 | ||
77 | runTests($options, $tests, $dataFiles); | |
78 | ||
79 |