]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/unisetperf/unisetperf.pl
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / test / perf / unisetperf / unisetperf.pl
CommitLineData
46f4442e
A
1#!/usr/bin/perl
2# ********************************************************************
3# * COPYRIGHT:
57a6839d 4# * Copyright (c) 2005-2013, International Business Machines Corporation and
46f4442e
A
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 = {
57a6839d
A
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};
46f4442e
A
26
27# programs
28# tests will be done for all the programs. Results will be stored and connected
29my $p;
30if ($OnWindows) {
57a6839d 31 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/unisetperf/$WindowsPlatform/Release/unisetperf.exe";
46f4442e 32} else {
57a6839d 33 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/unisetperf/unisetperf";
46f4442e 34}
46f4442e
A
35
36my $tests = {
57a6839d
A
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};
46f4442e
A
48
49my $dataFiles = {
57a6839d
A
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};
46f4442e
A
63
64runTests($options, $tests, $dataFiles);
65
66$options = {
57a6839d
A
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};
46f4442e
A
76
77$tests = {
57a6839d
A
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};
46f4442e
A
88
89runTests($options, $tests, $dataFiles);