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