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