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