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 16my $options = { 17 "title"=>"Character property performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", 18 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, 19 "operationIs"=>"code point", 20 "timePerOperationIs"=>"Time per code point", 21 "passes"=>"10", 22 "time"=>"5", 23 #"outputType"=>"HTML", 24 "dataDir"=>"Not Using Data Files", 25 "outputDir"=>"../results" 26}; 27 28# programs 29 30my $p1; # Previous 31my $p2; # Latest 32if ($OnWindows) { 33 $p1 = "cd ".$ICUPrevious."/bin && ".$ICUPathPrevious."/charperf/$WindowsPlatform/Release/charperf.exe"; 34 $p2 = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/charperf/$WindowsPlatform/Release/charperf.exe"; 35} else { 36 $p1 = "LD_LIBRARY_PATH=".$ICUPrevious."/source/lib:".$ICUPrevious."/source/tools/ctestfw ".$ICUPathPrevious."/charperf/charperf"; 37 $p2 = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/charperf/charperf"; 38} 39 40my $dataFiles = ""; 41 42my $tests = { 43 "isAlpha", ["$p1 TestIsAlpha" , "$p2 TestIsAlpha" ], 44 "isUpper", ["$p1 TestIsUpper" , "$p2 TestIsUpper" ], 45 "isLower", ["$p1 TestIsLower" , "$p2 TestIsLower" ], 46 "isDigit", ["$p1 TestIsDigit" , "$p2 TestIsDigit" ], 47 "isSpace", ["$p1 TestIsSpace" , "$p2 TestIsSpace" ], 48 "isAlphaNumeric", ["$p1 TestIsAlphaNumeric" , "$p2 TestIsAlphaNumeric" ], 49 "isPrint", ["$p1 TestIsPrint" , "$p2 TestIsPrint" ], 50 "isControl", ["$p1 TestIsControl" , "$p2 TestIsControl" ], 51 "toLower", ["$p1 TestToLower" , "$p2 TestToLower" ], 52 "toUpper", ["$p1 TestToUpper" , "$p2 TestToUpper" ], 53 "isWhiteSpace", ["$p1 TestIsWhiteSpace" , "$p2 TestIsWhiteSpace" ], 54}; 55 56runTests($options, $tests, $dataFiles); 57 58 59