]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/strsrchperf/StrSrchPerf_r.pl
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / strsrchperf / StrSrchPerf_r.pl
1 #!/usr/bin/perl
2 # ********************************************************************
3 # * COPYRIGHT:
4 # * Copyright (c) 2008-2013, International Business Machines
5 # * Corporation and 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" => "String search performance regression: ICU ("
18 . $ICUPreviousVersion . " and "
19 . $ICULatestVersion . ")",
20 "headers" => "ICU" . $ICUPreviousVersion . " ICU" . $ICULatestVersion,
21 "operationIs" => "code point",
22 "timePerOperationIs" => "Time per code point",
23 "passes" => "10",
24 "time" => "5",
25
26 #"outputType"=>"HTML",
27 "dataDir" => $UDHRDataPath,
28 "outputDir" => "../results"
29 };
30
31 # programs
32
33 my $p1; # Previous
34 my $p2; # Latest
35
36 if ($OnWindows) {
37 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
38 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
39 }
40 else {
41 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious . "/strsrchperf/strsrchperf -b";
42 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest . "/strsrchperf/strsrchperf -b";
43 }
44
45 my $dataFiles = {
46 "en" => ["udhr_eng.txt"],
47 "de" => ["udhr_deu_1996.txt"],
48 "fr" => ["udhr_fra.txt"],
49 "ru" => ["udhr_rus.txt"],
50 "th" => ["udhr_tha.txt"],
51 "ja" => ["udhr_jpn.txt"],
52 "zh" => ["udhr_cmn_hans.txt"],
53 };
54
55 my $tests = {
56 "ICU Forward Search", [ "$p1 Test_ICU_Forward_Search", "$p2 Test_ICU_Forward_Search" ],
57 "ICU Backward Search",[ "$p1 Test_ICU_Backward_Search", "$p2 Test_ICU_Backward_Search" ],
58 };
59
60 runTests( $options, $tests, $dataFiles );
61
62