File: ConvPerf_r.pl

package info (click to toggle)
icu 78.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 123,988 kB
  • sloc: cpp: 527,891; ansic: 112,789; sh: 4,983; makefile: 4,657; perl: 3,199; python: 2,933; xml: 749; sed: 36; lisp: 12
file content (72 lines) | stat: -rwxr-xr-x 3,065 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/perl
#  ********************************************************************
#  * Copyright (C) 2016 and later: Unicode, Inc. and others.
#  * License & terms of use: http://www.unicode.org/copyright.html
#  ********************************************************************
#  ********************************************************************
#  * COPYRIGHT:
#  * Copyright (c) 2002-2013, International Business Machines
#  * Corporation and others. All Rights Reserved.
#  ********************************************************************

#use strict;

require "../perldriver/Common.pl";

use lib '../perldriver';

use PerfFramework;

# This test only works on Windows.
if (!$OnWindows) {
    print "This test only works on Windows.\n";
    exit(1);
}

my $options = {
    "title"=>"Conversion performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")",
    "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion,
    "operationIs"=>"code point",
    "timePerOperationIs"=>"Time per code point",
    "passes"=>"10",
    "time"=>"5",
    #"outputType"=>"HTML",
    "dataDir"=>"Not Using Data Files",
    "outputDir"=>"../results"
};

# programs

my $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/convperf/$WindowsPlatform/Release/convperf.exe"; # Previous
my $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/convperf/$WindowsPlatform/Release/convperf.exe"; # Latest

my $dataFiles = "";


my $tests = { 
    "UTF-8 From Unicode",       ["$p1,TestICU_UTF8_FromUnicode",        "$p2,TestICU_UTF8_FromUnicode" ],
    "UTF-8 To Unicode",         ["$p1,TestICU_UTF8_ToUnicode",          "$p2,TestICU_UTF8_ToUnicode" ],
    ####
    "ISO-8859-1 From Unicode",  ["$p1,TestICU_Latin1_FromUnicode",      "$p2,TestICU_Latin1_FromUnicode" ],
    "ISO-8859-1 To Unicode",    ["$p1,TestICU_Latin1_ToUnicode",        "$p2,TestICU_Latin1_ToUnicode" ],
    ####
    "Shift-JIS From Unicode",   ["$p1,TestICU_SJIS_FromUnicode",        "$p2,TestICU_SJIS_FromUnicode" ],
    "Shift-JIS To Unicode",     ["$p1,TestICU_SJIS_ToUnicode",          "$p2,TestICU_SJIS_ToUnicode" ],
    ####
    "EUC-JP From Unicode",      ["$p1,TestICU_EUCJP_FromUnicode",       "$p2,TestICU_EUCJP_FromUnicode" ],
    "EUC-JP To Unicode",        ["$p1,TestICU_EUCJP_ToUnicode",         "$p2,TestICU_EUCJP_ToUnicode" ],
    ####
    "GB2312 From Unicode",      ["$p1,TestICU_GB2312_FromUnicode",      "$p2,TestICU_GB2312_FromUnicode" ],
    "GB2312 To Unicode",        ["$p1,TestICU_GB2312_ToUnicode",        "$p2,TestICU_GB2312_ToUnicode" ],
    ####
    "ISO2022KR From Unicode",   ["$p1,TestICU_ISO2022KR_FromUnicode",   "$p2,TestICU_ISO2022KR_FromUnicode" ],
    "ISO2022KR To Unicode",     ["$p1,TestICU_ISO2022KR_ToUnicode",     "$p2,TestICU_ISO2022KR_ToUnicode" ],
    ####
    "ISO2022JP From Unicode",   ["$p1,TestICU_ISO2022JP_FromUnicode",   "$p2,TestICU_ISO2022JP_FromUnicode" ],
    "ISO2022JP To Unicode",     ["$p1,TestICU_ISO2022JP_ToUnicode",     "$p2,TestICU_ISO2022JP_ToUnicode" ],
};


runTests($options, $tests, $dataFiles);