1#!/usr/bin/perl 2# ******************************************************************** 3# * Copyright (c) 2002-2008, International Business Machines 4# * Corporation and others. All Rights Reserved. 5# ******************************************************************** 6 7#use strict; 8 9require "../perldriver/Common.pl"; 10 11use lib '../perldriver'; 12 13use PerfFramework; 14 15my $options = { 16 "title"=>"BreakIterator performance regression: ICU (".$ICUPreviousVersion." and ".$ICULatestVersion.")", 17 "headers"=>"ICU".$ICUPreviousVersion." ICU".$ICULatestVersion, 18 "operationIs"=>"code point", 19 "eventIs"=>"break", 20 "passes"=>"10", 21 "time"=>"5", 22 #"outputType"=>"HTML", 23 "dataDir"=>$CollationDataPath, 24 "outputDir"=>"../results" 25 }; 26 27# programs 28# tests will be done for all the programs. Results will be stored and connected 29my $m1 = "-- -m char"; 30my $m2 = "-- -m word"; 31my $m3 = "-- -m line"; 32my $m4 = "-- -m sentence"; 33 34my $m; 35 36if(@_ >= 0) { 37 $m = "-- -m ".shift; 38} else { 39 $m = $m1; 40} 41 42my $p1; # Previous 43my $p2; # Latest 44 45if ($OnWindows) { 46 $p1 = $ICUPathPrevious."/ubrkperf/$WindowsPlatform/Release/ubrkperf.exe"; 47 $p2 = $ICUPathLatest."/ubrkperf/$WindowsPlatform/Release/ubrkperf.exe"; 48} else { 49 $p1 = $ICUPathPrevious."/ubrkperf/ubrkperf"; 50 $p2 = $ICUPathLatest."/ubrkperf/ubrkperf"; 51} 52 53my $dataFiles = { 54"en", [ 55 "TestNames_Asian.txt", 56 "TestNames_Chinese.txt", 57 "TestNames_Japanese.txt", 58 "TestNames_Japanese_h.txt", 59 "TestNames_Japanese_k.txt", 60 "TestNames_Korean.txt", 61 "TestNames_Latin.txt", 62 "TestNames_SerbianSH.txt", 63 "TestNames_SerbianSR.txt", 64 "TestNames_Thai.txt", 65 "Testnames_Russian.txt", 66], 67"th", ["TestNames_Thai.txt", "th18057.txt"] 68}; 69 70 71my $tests = { 72"TestForwardChar", ["$p1 $m1 TestICUForward", "$p2 $m1 TestICUForward"], 73"TestForwardWord", ["$p1 $m2 TestICUForward", "$p2 $m2 TestICUForward"], 74"TestForwardLine", ["$p1 $m3 TestICUForward", "$p2 $m3 TestICUForward"], 75"TestForwardSentence", ["$p1 $m4 TestICUForward", "$p2 $m4 TestICUForward"], 76 77"TestIsBoundChar", ["$p1 $m1 TestICUIsBound", "$p2 $m1 TestICUIsBound"], 78"TestIsBoundWord", ["$p1 $m2 TestICUIsBound", "$p2 $m2 TestICUIsBound"], 79"TestIsBoundLine", ["$p1 $m3 TestICUIsBound", "$p2 $m3 TestICUIsBound"], 80"TestIsBoundSentence", ["$p1 $m4 TestICUIsBound", "$p2 $m4 TestICUIsBound"], 81 82}; 83 84runTests($options, $tests, $dataFiles); 85 86 87