summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-4.4/test/perf/unisetperf/unisetperf.pl
blob: 5e984c6fad6aadbe90c494b250b0ccf1e2ac3e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/perl
#  ********************************************************************
#  * COPYRIGHT:
#  * Copyright (c) 2005-2008, International Business Machines Corporation and
#  * others. All Rights Reserved.
#  ********************************************************************

#use strict;

require "../perldriver/Common.pl";

use lib '../perldriver';

use PerfFramework;

my $options = {
	       "title"=>"UnicodeSet span()/contains() performance",
	       "headers"=>"Bv Bv0",
	       "operationIs"=>"tested Unicode code point",
	       "passes"=>"3",
	       "time"=>"2",
	       #"outputType"=>"HTML",
	       "dataDir"=>$UDHRDataPath,
           "outputDir"=>"../results"
	      };

# programs
# tests will be done for all the programs. Results will be stored and connected
my $p;
if ($OnWindows) {
	$p = $ICUPathLatest."/unisetperf/$WindowsPlatform/Release/unisetperf.exe";
} else {
	$p = $ICUPathLatest."/unisetperf/unisetperf";
}
my $pc =  "$p Contains";
my $p16 = "$p SpanUTF16";
my $p8 =  "$p SpanUTF8";

my $tests = {
	     "Contains",  ["$pc  --type Bv",
	                   "$pc  --type Bv0"
	                   ],
	     "SpanUTF16", ["$p16 --type Bv",
	                   "$p16 --type Bv0"
	                   ]
	    };

my $dataFiles = {
		 "",
		 [
		  "udhr_eng.txt",
          "udhr_deu_1996.txt",
          "udhr_fra.txt",
          "udhr_rus.txt",
          "udhr_tha.txt",
          "udhr_jpn.txt",
          "udhr_cmn_hans.txt",
          "udhr_cmn_hant.txt",
          "udhr_jpn.html"
		 ]
		};

runTests($options, $tests, $dataFiles);

$options = {
	       "title"=>"UnicodeSet span()/contains() performance",
	       "headers"=>"Bv BvF Bvp BvpF L Bvl",
	       "operationIs"=>"tested Unicode code point",
	       "passes"=>"3",
	       "time"=>"2",
	       #"outputType"=>"HTML",
	       "dataDir"=>$UDHRDataPath,
	       "outputDir"=>"../results"
	      };

$tests = {
	     "SpanUTF8",  ["$p8  --type Bv",
	                   "$p8  --type BvF",
	                   "$p8  --type Bvp",
	                   "$p8  --type BvpF",
	                   "$p8  --type L",
	                   "$p8  --type Bvl"
	                   ]
	    };

runTests($options, $tests, $dataFiles);