1#!/usr/bin/perl
2#  ********************************************************************
3#  * COPYRIGHT:
4#  * Copyright (c) 2002-2013, International Business Machines
5#  * Corporation and others. All Rights Reserved.
6#  ********************************************************************
7
8#use strict;
9
10require "../perldriver/Common.pl";
11
12use lib '../perldriver';
13
14use PerfFramework;
15
16# This test only works on Windows.
17if (!$OnWindows) {
18    print "This test only works on Windows.\n";
19    exit(1);
20}
21
22my $options = {
23    "title"=>"Conversion performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
24    "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
25    "operationIs"=>"code point",
26    "timePerOperationIs"=>"Time per code point",
27    "passes"=>"10",
28    "time"=>"5",
29    #"outputType"=>"HTML",
30    "dataDir"=>"Not Using Data Files",
31    "outputDir"=>"../results"
32};
33
34# programs
35
36my $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/convperf/$WindowsPlatform/Release/convperf.exe"; # Previous
37my $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/convperf/$WindowsPlatform/Release/convperf.exe"; # Latest
38
39my $dataFiles = "";
40
41
42my $tests = {
43    "UTF-8 From Unicode",       ["$p1,TestICU_UTF8_FromUnicode",        "$p2,TestICU_UTF8_FromUnicode" ],
44    "UTF-8 To Unicode",         ["$p1,TestICU_UTF8_ToUnicode",          "$p2,TestICU_UTF8_ToUnicode" ],
45    ####
46    "ISO-8859-1 From Unicode",  ["$p1,TestICU_Latin1_FromUnicode",      "$p2,TestICU_Latin1_FromUnicode" ],
47    "ISO-8859-1 To Unicode",    ["$p1,TestICU_Latin1_ToUnicode",        "$p2,TestICU_Latin1_ToUnicode" ],
48    ####
49    "Shift-JIS From Unicode",   ["$p1,TestICU_SJIS_FromUnicode",        "$p2,TestICU_SJIS_FromUnicode" ],
50    "Shift-JIS To Unicode",     ["$p1,TestICU_SJIS_ToUnicode",          "$p2,TestICU_SJIS_ToUnicode" ],
51    ####
52    "EUC-JP From Unicode",      ["$p1,TestICU_EUCJP_FromUnicode",       "$p2,TestICU_EUCJP_FromUnicode" ],
53    "EUC-JP To Unicode",        ["$p1,TestICU_EUCJP_ToUnicode",         "$p2,TestICU_EUCJP_ToUnicode" ],
54    ####
55    "GB2312 From Unicode",      ["$p1,TestICU_GB2312_FromUnicode",      "$p2,TestICU_GB2312_FromUnicode" ],
56    "GB2312 To Unicode",        ["$p1,TestICU_GB2312_ToUnicode",        "$p2,TestICU_GB2312_ToUnicode" ],
57    ####
58    "ISO2022KR From Unicode",   ["$p1,TestICU_ISO2022KR_FromUnicode",   "$p2,TestICU_ISO2022KR_FromUnicode" ],
59    "ISO2022KR To Unicode",     ["$p1,TestICU_ISO2022KR_ToUnicode",     "$p2,TestICU_ISO2022KR_ToUnicode" ],
60    ####
61    "ISO2022JP From Unicode",   ["$p1,TestICU_ISO2022JP_FromUnicode",   "$p2,TestICU_ISO2022JP_FromUnicode" ],
62    "ISO2022JP To Unicode",     ["$p1,TestICU_ISO2022JP_ToUnicode",     "$p2,TestICU_ISO2022JP_ToUnicode" ],
63};
64
65
66runTests($options, $tests, $dataFiles);
67
68
69