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