1#!/usr/bin/perl 2# ******************************************************************** 3# * COPYRIGHT: 4# * Copyright (c) 2005-2013, International Business Machines Corporation and 5# * 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"=>"UnicodeSet span()/contains() performance", 18 "headers"=>"Bv Bv0", 19 "operationIs"=>"tested Unicode code point", 20 "passes"=>"3", 21 "time"=>"2", 22 #"outputType"=>"HTML", 23 "dataDir"=>$UDHRDataPath, 24 "outputDir"=>"../results" 25}; 26 27# programs 28# tests will be done for all the programs. Results will be stored and connected 29my $p; 30if ($OnWindows) { 31 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/unisetperf/$WindowsPlatform/Release/unisetperf.exe"; 32} else { 33 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/unisetperf/unisetperf"; 34} 35 36my $tests = { 37 "Contains", 38 [ 39 "$p,Contains --type Bv", 40 "$p,Contains --type Bv0" 41 ], 42 "SpanUTF16", 43 [ 44 "$p,SpanUTF16 --type Bv", 45 "$p,SpanUTF16 --type Bv0" 46 ] 47}; 48 49my $dataFiles = { 50 "", 51 [ 52 "udhr_eng.txt", 53 "udhr_deu_1996.txt", 54 "udhr_fra.txt", 55 "udhr_rus.txt", 56 "udhr_tha.txt", 57 "udhr_jpn.txt", 58 "udhr_cmn_hans.txt", 59 "udhr_cmn_hant.txt", 60 "udhr_jpn.html" 61 ] 62}; 63 64runTests($options, $tests, $dataFiles); 65 66$options = { 67 "title"=>"UnicodeSet span()/contains() performance", 68 "headers"=>"Bv BvF Bvp BvpF L Bvl", 69 "operationIs"=>"tested Unicode code point", 70 "passes"=>"3", 71 "time"=>"2", 72 #"outputType"=>"HTML", 73 "dataDir"=>$UDHRDataPath, 74 "outputDir"=>"../results" 75}; 76 77$tests = { 78 "SpanUTF8", 79 [ 80 "$p,SpanUTF8 --type Bv", 81 "$p,SpanUTF8 --type BvF", 82 "$p,SpanUTF8 --type Bvp", 83 "$p,SpanUTF8 --type BvpF", 84 "$p,SpanUTF8 --type L", 85 "$p,SpanUTF8 --type Bvl" 86 ] 87}; 88 89runTests($options, $tests, $dataFiles); 90