1#!/usr/bin/perl 2# ******************************************************************** 3# * COPYRIGHT: 4# * Copyright (c) 2002-2007, International Business Machines 5# * Corporation and others. All Rights Reserved. 6# ******************************************************************** 7 8use strict; 9 10#Assume we are running outside of the ICU source 11use lib './ICU-3.0/ICU/source/test/perf/perldriver'; 12 13use PerfFramework; 14 15my $options = { 16 "title"=>"Unicode String performance regression (ICU 2.8 and 3.0)", 17 "headers"=>"ICU28 ICU30", 18 "operationIs"=>"Unicode String", 19 "passes"=>"10", 20 "time"=>"5", 21 #"outputType"=>"HTML", 22 "dataDir"=>"c:/src/perf/data", 23 "outputDir"=>"results_ICU4C" 24 }; 25 26# programs 27 28my $p1 = "icu-2.8/icu/bin/stringperf28.exe -b -u"; 29my $p2 = "icu-3.0/icu/bin/stringperf30.exe -b -u"; 30 31my $dataFiles = { 32 "", 33 [ 34 "TestNames_Asian.txt", 35 "TestNames_Chinese.txt", 36 "TestNames_Japanese.txt", 37 "TestNames_Japanese_h.txt", 38 "TestNames_Japanese_k.txt", 39 "TestNames_Korean.txt", 40 "TestNames_Latin.txt", 41 "TestNames_SerbianSH.txt", 42 "TestNames_SerbianSR.txt", 43 "TestNames_Thai.txt", 44 "Testnames_Russian.txt", 45# "th18057.txt", 46# "thesis.txt", 47# "vfear11a.txt", 48 ] 49 }; 50 51 52my $tests = { 53"Object Construction(empty string)", ["$p1 TestCtor" , "$p2 TestCtor" ], 54"Object Construction(single char)", ["$p1 TestCtor1" , "$p2 TestCtor1" ], 55"Object Construction(another string)", ["$p1 TestCtor2" , "$p2 TestCtor2" ], 56"Object Construction(string literal)", ["$p1 TestCtor3" , "$p2 TestCtor3" ], 57"String Assignment(helper)", ["$p1 TestAssign" , "$p2 TestAssign" ], 58"String Assignment(string literal)", ["$p1 TestAssign1" , "$p2 TestAssign1" ], 59"String Assignment(another string)", ["$p1 TestAssign2" , "$p2 TestAssign2" ], 60"Get String or Character", ["$p1 TestGetch" , "$p2 TestGetch" ], 61"Concatenation", ["$p1 TestCatenate" , "$p2 TestCatenate" ], 62"String Scanning(char)", ["$p1 TestScan" , "$p2 TestScan" ], 63"String Scanning(string)", ["$p1 TestScan1" , "$p2 TestScan1" ], 64"String Scanning(char set)", ["$p1 TestScan2" , "$p2 TestScan2" ], 65}; 66 67 68runTests($options, $tests, $dataFiles); 69 70 71