OLD | NEW |
| (Empty) |
1 #!/usr/bin/perl | |
2 # ******************************************************************** | |
3 # * Copyright (c) 2002-2013, International Business Machines | |
4 # * Corporation and others. All Rights Reserved. | |
5 # ******************************************************************** | |
6 | |
7 #use strict; | |
8 | |
9 require "../perldriver/Common.pl"; | |
10 | |
11 use lib '../perldriver'; | |
12 | |
13 use PerfFramework; | |
14 | |
15 my $options = { | |
16 "title"=>"BreakIterator performance regression: ICU (".$ICUPreviousVersion."
and ".$ICULatestVersion.")", | |
17 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, | |
18 "operationIs"=>"code point", | |
19 "eventIs"=>"break", | |
20 "passes"=>"10", | |
21 "time"=>"5", | |
22 #"outputType"=>"HTML", | |
23 "dataDir"=>$CollationDataPath, | |
24 "outputDir"=>"../results" | |
25 }; | |
26 | |
27 # programs | |
28 # tests will be done for all the programs. Results will be stored and connected | |
29 my $m1 = "-- -m char"; | |
30 my $m2 = "-- -m word"; | |
31 my $m3 = "-- -m line"; | |
32 my $m4 = "-- -m sentence"; | |
33 | |
34 my $m; | |
35 | |
36 if(@_ >= 0) { | |
37 $m = "-- -m ".shift; | |
38 } else { | |
39 $m = $m1; | |
40 } | |
41 | |
42 my $p1; # Previous | |
43 my $p2; # Latest | |
44 | |
45 if ($OnWindows) { | |
46 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/ubrkperf/$WindowsPlat
form/Release/ubrkperf.exe"; | |
47 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/ubrkperf/$WindowsPlatform
/Release/ubrkperf.exe"; | |
48 } else { | |
49 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/t
ools/ctestfw ".$ICUPathPrevious."/ubrkperf/ubrkperf"; | |
50 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools
/ctestfw ".$ICUPathLatest."/ubrkperf/ubrkperf"; | |
51 } | |
52 | |
53 my $dataFiles = { | |
54 "en", | |
55 [ | |
56 "thesis.txt", | |
57 "2drvb10.txt", | |
58 "ulyss10.txt", | |
59 "nvsbl10.txt", | |
60 "vfear11a.txt", | |
61 "TestNames_Asian.txt", | |
62 "TestNames_Chinese.txt", | |
63 "TestNames_Japanese.txt", | |
64 "TestNames_Japanese_h.txt", | |
65 "TestNames_Japanese_k.txt", | |
66 "TestNames_Korean.txt", | |
67 "TestNames_Latin.txt", | |
68 "TestNames_SerbianSH.txt", | |
69 "TestNames_SerbianSR.txt", | |
70 "TestNames_Thai.txt", | |
71 "Testnames_Russian.txt", | |
72 ], | |
73 "th", | |
74 [ | |
75 "TestNames_Thai.txt", | |
76 "th18057.txt" | |
77 ] | |
78 }; | |
79 | |
80 | |
81 my $tests = { | |
82 "TestForwardChar", ["$p1,$m1,TestICUForward", "$p2,$m1,TestICUForward"]
, | |
83 "TestForwardWord", ["$p1,$m2,TestICUForward", "$p2,$m2,TestICUForward"]
, | |
84 "TestForwardLine", ["$p1,$m3,TestICUForward", "$p2,$m3,TestICUForward"]
, | |
85 "TestForwardSentence", ["$p1,$m4,TestICUForward", "$p2,$m4,TestICUForward"]
, | |
86 | |
87 "TestIsBoundChar", ["$p1,$m1,TestICUIsBound", "$p2,$m1,TestICUIsBound"]
, | |
88 "TestIsBoundWord", ["$p1,$m2,TestICUIsBound", "$p2,$m2,TestICUIsBound"]
, | |
89 "TestIsBoundLine", ["$p1,$m3,TestICUIsBound", "$p2,$m3,TestICUIsBound"]
, | |
90 "TestIsBoundSentence", ["$p1,$m4,TestICUIsBound", "$p2,$m4,TestICUIsBound"]
, | |
91 }; | |
92 | |
93 runTests($options, $tests, $dataFiles); | |
94 | |
95 | |
OLD | NEW |