]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/strsrchperf/StrSrchPerf_r.pl
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / perf / strsrchperf / StrSrchPerf_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# ********************************************************************
46f4442e 7# * COPYRIGHT:
57a6839d 8# * Copyright (c) 2008-2013, International Business Machines
46f4442e
A
9# * Corporation and others. All Rights Reserved.
10# ********************************************************************
11
12#use strict;
13
14require "../perldriver/Common.pl";
15
16use lib '../perldriver';
17
18use PerfFramework;
19
20my $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
37my $p1; # Previous
38my $p2; # Latest
39
40if ($OnWindows) {
57a6839d
A
41 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
42 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest . "/strsrchperf/$WindowsPlatform/Release/strsrchperf.exe -b";
46f4442e
A
43}
44else {
57a6839d
A
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";
46f4442e
A
47}
48
49my $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
59my $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
64runTests( $options, $tests, $dataFiles );
65
66