OLD | NEW |
| (Empty) |
1 #!/usr/bin/perl | |
2 # ******************************************************************** | |
3 # * COPYRIGHT: | |
4 # * Copyright (c) 2003-2013, International Business Machines Corporation and | |
5 # * others. All Rights Reserved. | |
6 # ******************************************************************** | |
7 | |
8 | |
9 #use strict; | |
10 | |
11 require "../perldriver/Common.pl"; | |
12 | |
13 use lib '../perldriver'; | |
14 | |
15 use PerfFramework; | |
16 | |
17 my $options = { | |
18 "title"=>"Unicode String performance: ICU ".$ICULatestVersion." vs. STDLib", | |
19 "headers"=>"StdLib ICU".$ICULatestVersion, | |
20 "operationIs"=>"Unicode String", | |
21 "timePerOperationIs"=>"Time per Unicode String", | |
22 "passes"=>"5", | |
23 "time"=>"2", | |
24 #"outputType"=>"HTML", | |
25 "dataDir"=>$CollationDataPath, | |
26 "outputDir"=>"../results" | |
27 }; | |
28 | |
29 | |
30 # programs | |
31 # tests will be done for all the programs. Results will be stored and connected | |
32 my $p; | |
33 if ($OnWindows) { | |
34 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/ustrperf/$WindowsPlatform/
Release/stringperf.exe -l -u"; | |
35 } else { | |
36 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/
ctestfw ".$ICUPathLatest."/ustrperf/stringperf -l -u"; | |
37 } | |
38 | |
39 my $tests = { | |
40 "Object Construction(empty string)", ["$p,TestStdLibCtor" , "$p
,TestCtor" ], | |
41 "Object Construction(single char)", ["$p,TestStdLibCtor1" , "$p
,TestCtor1" ], | |
42 "Object Construction(another string)", ["$p,TestStdLibCtor2" , "$p
,TestCtor2" ], | |
43 "Object Construction(string literal)", ["$p,TestStdLibCtor3" , "$p
,TestCtor3" ], | |
44 "String Assignment(helper)", ["$p,TestStdLibAssign" , "$p
,TestAssign" ], | |
45 "String Assignment(string literal)", ["$p,TestStdLibAssign1" , "$p
,TestAssign1" ], | |
46 "String Assignment(another string)", ["$p,TestStdLibAssign2" , "$p
,TestAssign2" ], | |
47 "Get String or Character", ["$p,TestStdLibGetch" , "$p
,TestGetch" ], | |
48 "Concatenation", ["$p,TestStdLibCatenate" , "$p
,TestCatenate" ], | |
49 "String Scanning(char)", ["$p,TestStdLibScan" , "$p
,TestScan" ], | |
50 "String Scanning(string)", ["$p,TestStdLibScan1" , "$p
,TestScan1" ], | |
51 "String Scanning(char set)", ["$p,TestStdLibScan2" , "$p
,TestScan2" ], | |
52 }; | |
53 | |
54 my $dataFiles = { | |
55 "", | |
56 [ | |
57 "TestNames_Asian.txt", | |
58 "TestNames_Chinese.txt", | |
59 "TestNames_Simplified_Chinese.txt", | |
60 "TestNames_Japanese_h.txt", | |
61 "TestNames_Japanese_k.txt", | |
62 "TestNames_Korean.txt", | |
63 "TestNames_Latin.txt", | |
64 "TestNames_SerbianSH.txt", | |
65 "TestNames_SerbianSR.txt", | |
66 "TestNames_Thai.txt", | |
67 "Testnames_Russian.txt", | |
68 "th18057.txt", | |
69 ] | |
70 }; | |
71 | |
72 runTests($options, $tests, $dataFiles); | |
73 | |
74 # The whole command line would be something like: | |
75 # stringperf.exe -p 5 -t 2 -f c:/src/data/perf/TestNames_Asian.txt -l -u T
estStdLibCatenate | |
OLD | NEW |