e7286d00351e2462138b591ccabe1ce724591f35
[occt.git] / tests / perf / ncollection / A2
1 pload QAcommands
2
3 set info [QANTestNCollectionIndexedMap]
4
5 set keys {}
6 set values {}
7 foreach line [split $info "\n"] {
8   set key [string trim [string range $line 0 [expr {[string first ":" $line] - 1}]]]
9   set value [string trim [string range $line [expr {[string first ":" $line] + 1}] [expr {[string length $line] - 1}]]]
10   if {[string length $key] != 0} {
11     if {[string length $value] != 0} {
12       lappend keys $key
13       lappend values $value
14     }
15   }
16 }
17
18 if { [string compare $tcl_platform(platform) "windows"] != 0 } {
19   set check_values  { 0.1540285
20                       0.1286995
21                       0.1607561
22                       0.3624441
23                     }
24 } else {
25   set check_values  { 0.018136771
26                       0.008694706
27                       0.019123649
28                       0.784462745
29                     }
30 }
31
32 set index 0
33 foreach key $keys {
34   set value [lindex $values $index]
35   if { $value > [lindex $check_values $index] } {
36     puts "ERROR: performance of $key become worse"
37   } else {
38     puts "OK: performance of $key is OK"
39   }
40   incr index
41 }