1#!/usr/bin/perl
2#  ********************************************************************
3#  * COPYRIGHT:
4#  * Copyright (c) 2005-2008, 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 = $ICUPathLatest."/unisetperf/$WindowsPlatform/Release/unisetperf.exe";
32} else {
33	$p = $ICUPathLatest."/unisetperf/unisetperf";
34}
35my $pc =  "$p Contains";
36my $p16 = "$p SpanUTF16";
37my $p8 =  "$p SpanUTF8";
38
39my $tests = {
40	     "Contains",  ["$pc  --type Bv",
41	                   "$pc  --type Bv0"
42	                   ],
43	     "SpanUTF16", ["$p16 --type Bv",
44	                   "$p16 --type Bv0"
45	                   ]
46	    };
47
48my $dataFiles = {
49		 "",
50		 [
51		  "udhr_eng.txt",
52          "udhr_deu_1996.txt",
53          "udhr_fra.txt",
54          "udhr_rus.txt",
55          "udhr_tha.txt",
56          "udhr_jpn.txt",
57          "udhr_cmn_hans.txt",
58          "udhr_cmn_hant.txt",
59          "udhr_jpn.html"
60		 ]
61		};
62
63runTests($options, $tests, $dataFiles);
64
65$options = {
66	       "title"=>"UnicodeSet span()/contains() performance",
67	       "headers"=>"Bv BvF Bvp BvpF L Bvl",
68	       "operationIs"=>"tested Unicode code point",
69	       "passes"=>"3",
70	       "time"=>"2",
71	       #"outputType"=>"HTML",
72	       "dataDir"=>$UDHRDataPath,
73	       "outputDir"=>"../results"
74	      };
75
76$tests = {
77	     "SpanUTF8",  ["$p8  --type Bv",
78	                   "$p8  --type BvF",
79	                   "$p8  --type Bvp",
80	                   "$p8  --type BvpF",
81	                   "$p8  --type L",
82	                   "$p8  --type Bvl"
83	                   ]
84	    };
85
86runTests($options, $tests, $dataFiles);
87