0027146: Create command checkplatform
[occt.git] / tests / perf / ncollection / A1
CommitLineData
618617fe 1cpulimit 5000
2pload QAcommands
3
4set info [QANTestNCollectionPerformance]
5
6set values {}
7set keys {}
8unset -nocomplain std_cl occt_cl diff_cl
9foreach line [split $info "\n"] {
10 if { [regexp {(std::.*)} $line] } {
11 lappend keys $line
12 if {[info exists std_cl] && [info exists occt_cl] && [info exists diff_cl]} {
13 lappend values "$diff_cl"
14 }
15 }
16 regexp {\s*[-0-9*.+eE]+\s+([-0-9*.+eE]+)\s+([-0-9*.+eE]+)\s+([-0-9*.+eE]+)} $line dump std_cl occt_cl diff_cl
17}
18lappend values "$diff_cl"
19
863f782a 20if { [checkplatform -windows] } {
618617fe 21 set check_values { 1.383409071179103
22 5.1472531605899908
50b994e7 23 5.55719377028335395
618617fe 24 5.5309830187022213
50b994e7 25 1.58734859347377246
618617fe 26 1.18885181806915312
27 1.4285334583511072
28 0.20619280354776386
50b994e7 29 0.21983563611646603
618617fe 30 }
f1b0b4f9 31 if { [regexp {64} [dversion]] } {
863f782a 32 set check_values { 1.5
33 5.2
34 5.7
35 5.7
36 1.7
37 1.3
38 1.6
39 0.4
40 0.4
41 }
42 }
43} else {
44 set check_values { 1.2363286058767904
45 2.7537414143534
46 1.5596260162601621
47 3.937043746844462
48 1.2133020329576465
49 1.2164522569168656
50 1.2495457282327385
51 0.10352433841051313
52 0.45175659293697572
f1b0b4f9 53 }
618617fe 54}
863f782a 55
618617fe 56set index 0
57foreach key $keys {
58 set value [lindex $values $index]
59 if { $value > [lindex $check_values $index] } {
60 puts "Error: performance of $key become worse"
61 } else {
62 puts "OK: performance of $key is OK"
63 }
64 incr index
65}