]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/normperf/NormPerf_r.pl
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / normperf / NormPerf_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) 2002-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 = {
57a6839d
A
21 "title"=>"Normalization performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
22 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
23 "operationIs"=>"code point",
24 "timePerOperationIs"=>"Time per code point",
25 "passes"=>"10",
26 "time"=>"5",
27 #"outputType"=>"HTML",
28 "dataDir"=>$CollationDataPath,
29 "outputDir"=>"../results"
30};
46f4442e
A
31
32# programs
33
34my $p1; # Previous
35my $p2; # Latest
36
37if ($OnWindows) {
57a6839d
A
38 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/normperf/$WindowsPlatform/Release/normperf.exe";
39 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/normperf/$WindowsPlatform/Release/normperf.exe";
46f4442e 40} else {
57a6839d
A
41 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/normperf/normperf";
42 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/normperf/normperf";
46f4442e
A
43}
44
45my $dataFiles = {
57a6839d
A
46 "",
47 [
48 "TestNames_Asian.txt",
49 "TestNames_Chinese.txt",
50 "TestNames_Japanese.txt",
51 "TestNames_Japanese_h.txt",
52 "TestNames_Japanese_k.txt",
53 "TestNames_Korean.txt",
54 "TestNames_Latin.txt",
55 "TestNames_SerbianSH.txt",
56 "TestNames_SerbianSR.txt",
57 "TestNames_Thai.txt",
58 "Testnames_Russian.txt",
59 "th18057.txt",
60 "thesis.txt",
61 "vfear11a.txt",
62 ]
63};
46f4442e
A
64
65
66my $tests = {
57a6839d
A
67 "NFC_NFD_Text", ["$p1,TestICU_NFC_NFD_Text" , "$p2,TestICU_NFC_NFD_Text" ],
68 "NFC_NFC_Text", ["$p1,TestICU_NFC_NFC_Text" , "$p2,TestICU_NFC_NFC_Text" ],
69 "NFC_Orig_Text", ["$p1,TestICU_NFC_Orig_Text" , "$p2,TestICU_NFC_Orig_Text"],
70 "NFD_NFD_Text", ["$p1,TestICU_NFD_NFD_Text" , "$p2,TestICU_NFD_NFD_Text" ],
71 "NFD_NFC_Text", ["$p1,TestICU_NFD_NFC_Text" , "$p2,TestICU_NFD_NFC_Text" ],
72 "NFD_Orig_Text", ["$p1,TestICU_NFD_Orig_Text" , "$p2,TestICU_NFD_Orig_Text"],
73 ##
74 "QC_NFC_NFD_Text", ["$p1,TestQC_NFC_NFD_Text" , "$p2,TestQC_NFC_NFD_Text" ],
75 "QC_NFC_NFC_Text", ["$p1,TestQC_NFC_NFC_Text" , "$p2,TestQC_NFC_NFC_Text" ],
76 "QC_NFC_Orig_Text", ["$p1,TestQC_NFC_Orig_Text" , "$p2,TestQC_NFC_Orig_Text"],
77 "QC_NFD_NFD_Text", ["$p1,TestQC_NFD_NFD_Text" , "$p2,TestQC_NFD_NFD_Text" ],
78 "QC_NFD_NFC_Text", ["$p1,TestQC_NFD_NFC_Text" , "$p2,TestQC_NFD_NFC_Text" ],
79 "QC_NFD_Orig_Text", ["$p1,TestQC_NFD_Orig_Text" , "$p2,TestQC_NFD_Orig_Text"],
80 ##
81 "IsNormalized_NFC_NFD_Text", ["$p1,TestIsNormalized_NFC_NFD_Text" , "$p2,TestIsNormalized_NFC_NFD_Text" ],
82 "IsNormalized_NFC_NFC_Text", ["$p1,TestIsNormalized_NFC_NFC_Text" , "$p2,TestIsNormalized_NFC_NFC_Text" ],
83 "IsNormalized_NFC_Orig_Text", ["$p1,TestIsNormalized_NFC_Orig_Text" , "$p2,TestIsNormalized_NFC_Orig_Text"],
84 "IsNormalized_NFD_NFD_Text", ["$p1,TestIsNormalized_NFD_NFD_Text" , "$p2,TestIsNormalized_NFD_NFD_Text" ],
85 "IsNormalized_NFD_NFC_Text", ["$p1,TestIsNormalized_NFD_NFC_Text" , "$p2,TestIsNormalized_NFD_NFC_Text" ],
86 "IsNormalized_NFD_Orig_Text", ["$p1,TestIsNormalized_NFD_Orig_Text" , "$p2,TestIsNormalized_NFD_Orig_Text"]
87};
46f4442e
A
88
89
90runTests($options, $tests, $dataFiles);
91
92