]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/perf/collperf/CollPerf.pl
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / perf / collperf / CollPerf.pl
CommitLineData
46f4442e 1#!/usr/bin/perl
73c04bcf
A
2# ********************************************************************
3# * COPYRIGHT:
57a6839d 4# * Copyright (c) 2005-2013, International Business Machines Corporation and
73c04bcf
A
5# * others. All Rights Reserved.
6# ********************************************************************
7
46f4442e 8#use strict;
73c04bcf
A
9
10use lib '../perldriver';
11
46f4442e
A
12require "../perldriver/Common.pl";
13
73c04bcf
A
14use PerfFramework;
15
73c04bcf 16my $options = {
57a6839d
A
17 "title"=>"Collation performance: ICU,POSIX,and Win",
18 "headers"=>"ICU POSIX WIN",
19 "operationIs"=>"unicode String",
20 "passes"=>"1",
21 "time"=>"2",
22 #"outputType"=>"HTML",
23 "dataDir"=>$CollationDataPath,
24 "outputDir"=>"../results"
25};
73c04bcf 26
51004dcb
A
27my $p;
28if ($OnWindows) {
57a6839d 29 $p = "cd ".$ICULatest."/bin && ".$ICUPathLatest."/collperf/$WindowsPlatform/Release/collperf.exe";
51004dcb 30} else {
57a6839d 31 $p = "LD_LIBRARY_PATH=".$ICULatest."/source/lib:".$ICULatest."/source/tools/ctestfw ".$ICUPathLatest."/collperf/collperf";
51004dcb
A
32}
33
73c04bcf
A
34# programs
35# tests will be done for all the programs. Results will be stored and connected
51004dcb
A
36my $test;
37if ($OnWindows) {
57a6839d
A
38 $tests = {
39 "Key Gen null", ["$p,TestIcu_KeyGen_null", "$p,TestPosix_KeyGen_null", "$p,TestWin_KeyGen_null"],
40 "qsort strcoll null", ["$p,TestIcu_qsort_strcoll_null", "$p,TestPosix_qsort_strcoll_null", "$p,TestWin_qsort_CompareStringW_null"],
41 "qsort use key", ["$p,TestIcu_qsort_usekey", "$p,TestPosix_qsort_usekey", "$p,TestWin_qsort_usekey"],
42 "Binary Search icu strcoll null", ["$p,TestIcu_BinarySearch_strcoll_null", "$p,TestPosix_BinarySearch_strcoll_null", "$p,TestWin_BinarySearch_CompareStringW_null"],
43 "Binary Search icu use key", ["$p,TestIcu_BinarySearch_usekey", "$p,TestPosix_BinarySearch_usekey", "$p,TestWin_BinarySearch_usekey"],
44 # These are the original test. They are commented out to so that the above test can run and compare certain aspects of collation.
45 #"Key Gen ICU null", ["$p,TestIcu_KeyGen_null"],
46 #"Key Gen ICU len", ["$p,TestIcu_KeyGen_len"],
47 #"Key Gen POSIX", ["$p,TestPosix_KeyGen_null"],
48 #"Key Gen Win", ["$p,TestWin_KeyGen_null"],
49 #"Iteration icu forward null", ["$p,TestIcu_ForwardIter_null"],
50 #"Iteration icu forward len", ["$p,TestIcu_ForwardIter_len"],
51 #"Iteration icu backward null", ["$p,TestIcu_BackwardIter_null"],
52 #"Iteration icu backward len", ["$p,TestIcu_BackwardIter_len"],
53 #"Iteration/all icu forward null", ["$p,TestIcu_ForwardIter_all_null"],
54 #"Iteration/all icu forward len", ["$p,TestIcu_ForwardIter_all_len"],
55 #"Iteration/all icu backward null", ["$p,TestIcu_BackwardIter_all_null"],
56 #"Iteration/all icu backward len", ["$p,TestIcu_BackwardIter_all_len"],
57 #"qsort icu strcoll null", ["$p,TestIcu_qsort_strcoll_null"],
58 #"qsort icu strcoll len", ["$p,TestIcu_qsort_strcoll_len"],
59 #"qsort icu use key", ["$p,TestIcu_qsort_usekey"],
60 #"qsort posix strcoll null", ["$p,TestPosix_qsort_strcoll_null"],
61 #"qsort posix use key", ["$p,TestPosix_qsort_usekey"],
62 #"qsort win CompareStringW null", ["$p,TestWin_qsort_CompareStringW_null"],
63 #"qsort win CompareStringW len", ["$p,TestWin_qsort_CompareStringW_len"],
64 #"qsort win use key", ["$p,TestWin_qsort_usekey"],
65 #"Binary Search icu strcoll null", ["$p,TestIcu_BinarySearch_strcoll_null"],
66 #"Binary Search icu strcoll len", ["$p,TestIcu_BinarySearch_strcoll_len"],
67 #"Binary Search icu use key", ["$p,TestIcu_BinarySearch_usekey"],
68 #"Binary Search icu u_strcmp", ["$p,TestIcu_BinarySearch_strcmp"],
69 #"Binary Search icu cmpCPO", ["$p,TestIcu_BinarySearch_cmpCPO"],
70 #"Binary Search posix strcoll null", ["$p,TestPosix_BinarySearch_strcoll_null"],
71 #"Binary Search posix use key", ["$p,TestPosix_BinarySearch_usekey"],
72 #"Binary Search win CompareStringW null", ["$p,TestWin_BinarySearch_CompareStringW_null"],
73 #"Binary Search win CompareStringW len", ["$p,TestWin_BinarySearch_CompareStringW_len"],
74 #"Binary Search win use key", ["$p,TestWin_BinarySearch_usekey"],
75 #"Binary Search win wcscmp", ["$p,TestWin_BinarySearch_wcscmp"],
76 };
51004dcb 77} else {
57a6839d
A
78 $tests = {
79 "Key Gen null", ["$p,TestIcu_KeyGen_null", "$p,TestPosix_KeyGen_null"],
80 "qsort strcoll null", ["$p,TestIcu_qsort_strcoll_null", "$p,TestPosix_qsort_strcoll_null"],
81 "qsort use key", ["$p,TestIcu_qsort_usekey", "$p,TestPosix_qsort_usekey"],
82 "Binary Search icu strcoll null", ["$p,TestIcu_BinarySearch_strcoll_null", "$p,TestPosix_BinarySearch_strcoll_null"],
83 "Binary Search icu use key", ["$p,TestIcu_BinarySearch_usekey", "$p,TestPosix_BinarySearch_usekey"],
84 };
51004dcb 85}
73c04bcf
A
86
87my $dataFiles = {
57a6839d
A
88 "",
89 [
90 "TestNames_Asian.txt",
91 "TestNames_Chinese.txt",
92 "TestNames_Japanese.txt",
93 "TestNames_Japanese_h.txt",
94 "TestNames_Japanese_k.txt",
95 "TestNames_Korean.txt",
96 "TestNames_Latin.txt",
97 "TestNames_Russian.txt",
98 "TestNames_SerbianSH.txt",
99 "TestNames_SerbianSR.txt",
100 "TestNames_Simplified_Chinese.txt",
101 "TestNames_Thai.txt"
102 ]
103};
73c04bcf
A
104
105runTests($options, $tests, $dataFiles);