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