]>
Commit | Line | Data |
---|---|---|
46f4442e | 1 | #!/usr/bin/perl |
73c04bcf | 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 | # ******************************************************************** | |
73c04bcf | 7 | # * COPYRIGHT: |
57a6839d | 8 | # * Copyright (c) 2005-2013, International Business Machines Corporation and |
73c04bcf A |
9 | # * others. All Rights Reserved. |
10 | # ******************************************************************** | |
11 | ||
46f4442e A |
12 | #use strict; |
13 | ||
14 | require "../perldriver/Common.pl"; | |
73c04bcf A |
15 | |
16 | use lib '../perldriver'; | |
17 | ||
18 | use PerfFramework; | |
19 | ||
73c04bcf | 20 | my $options = { |
57a6839d A |
21 | "title"=>"UTF performance: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", |
22 | "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, | |
23 | "operationIs"=>"gb18030 encoding string", | |
24 | "passes"=>"1", | |
25 | "time"=>"2", | |
26 | #"outputType"=>"HTML", | |
27 | "dataDir"=>$ConversionDataPath, | |
28 | "outputDir"=>"../results" | |
29 | }; | |
73c04bcf A |
30 | |
31 | # programs | |
32 | # tests will be done for all the programs. Results will be stored and connected | |
46f4442e A |
33 | my $p1; |
34 | my $p2; | |
35 | ||
36 | if ($OnWindows) { | |
57a6839d A |
37 | $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/utfperf/$WindowsPlatform/Release/utfperf.exe -e gb18030"; # Previous |
38 | $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/utfperf/$WindowsPlatform/Release/utfperf.exe -e gb18030"; # Latest | |
46f4442e | 39 | } else { |
57a6839d A |
40 | $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/utfperf/utfperf -e gb18030"; # Previous |
41 | $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/utfperf/utfperf -e gb18030"; # Latest | |
46f4442e | 42 | } |
73c04bcf A |
43 | |
44 | my $tests = { | |
57a6839d A |
45 | "Roundtrip", ["$p1,Roundtrip", "$p2,Roundtrip"], |
46 | "FromUnicode", ["$p1,FromUnicode", "$p2,FromUnicode"], | |
47 | "FromUTF8", ["$p1,FromUTF8", "$p2,FromUTF8"], | |
48 | }; | |
73c04bcf A |
49 | |
50 | my $dataFiles = { | |
57a6839d A |
51 | "", ["xuzhimo.txt"] |
52 | }; | |
73c04bcf A |
53 | |
54 | runTests($options, $tests, $dataFiles); |