]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/strsrchperf/StrSrchPerf_r.pl
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / strsrchperf / StrSrchPerf_r.pl
1 #!/usr/bin/perl
2 # ********************************************************************
3 # * Copyright (C) 2016 and later: Unicode, Inc. and others.
4 # * License & terms of use: http://www.unicode.org/copyright.html#License
5 # ********************************************************************
6 # ********************************************************************
7 # * COPYRIGHT:
8 # * Copyright (c) 2008-2013, International Business Machines
9 # * Corporation and others. All Rights Reserved.
10 # ********************************************************************
11
12 #use strict;
13
14 require "../perldriver/Common.pl";
15
16 use lib '../perldriver';
17
18 use PerfFramework;
19
20 my $options = {
21 "title" => "String search performance regression: ICU ("
22 . $ICUPreviousVersion . " and "
23 . $ICULatestVersion . ")",
24 "headers" => "ICU" . $ICUPreviousVersion . " ICU" . $ICULatestVersion,
25 "operationIs" => "code point",
26 "timePerOperationIs" => "Time per code point",
27 "passes" => "10",
28 "time" => "5",
29
30 #"outputType"=>"HTML",
31 "dataDir" => $UDHRDataPath,
32 "outputDir" => "../results"
33 };
34
35 # programs
36
37 my $p1; # Previous
38 my $p2; # Latest
39
40 if ($OnWindows) {
41 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
42 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
43 }
44 else {
45 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious . "/strsrchperf/strsrchperf -b";
46 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest . "/strsrchperf/strsrchperf -b";
47 }
48
49 my $dataFiles = {
50 "en" => ["udhr_eng.txt"],
51 "de" => ["udhr_deu_1996.txt"],
52 "fr" => ["udhr_fra.txt"],
53 "ru" => ["udhr_rus.txt"],
54 "th" => ["udhr_tha.txt"],
55 "ja" => ["udhr_jpn.txt"],
56 "zh" => ["udhr_cmn_hans.txt"],
57 };
58
59 my $tests = {
60 "ICU Forward Search", [ "$p1 Test_ICU_Forward_Search", "$p2 Test_ICU_Forward_Search" ],
61 "ICU Backward Search",[ "$p1 Test_ICU_Backward_Search", "$p2 Test_ICU_Backward_Search" ],
62 };
63
64 runTests( $options, $tests, $dataFiles );
65
66