| 1 | cpulimit 5000 |
| 2 | pload QAcommands |
| 3 | |
| 4 | set info [QANTestNCollectionPerformance] |
| 5 | |
| 6 | set values {} |
| 7 | set keys {} |
| 8 | unset -nocomplain std_cl occt_cl diff_cl |
| 9 | foreach 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 | } |
| 18 | lappend values "$diff_cl" |
| 19 | |
| 20 | if { [checkplatform -windows] } { |
| 21 | set check_values { 1.5 |
| 22 | 5.2 |
| 23 | 5.7 |
| 24 | 5.7 |
| 25 | 1.7 |
| 26 | 1.3 |
| 27 | 1.6 |
| 28 | 0.4 |
| 29 | 0.4 |
| 30 | } |
| 31 | } else { |
| 32 | set check_values { 1.4 |
| 33 | 5.0 |
| 34 | 1.6 |
| 35 | 7.0 |
| 36 | 1.4 |
| 37 | 1.4 |
| 38 | 1.4 |
| 39 | 0.2 |
| 40 | 0.5 |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | set index 0 |
| 45 | foreach key $keys { |
| 46 | set value [lindex $values $index] |
| 47 | if { $value > [lindex $check_values $index] } { |
| 48 | puts "Error: performance of $key become worse than before" |
| 49 | } else { |
| 50 | puts "OK: performance of $key is within expected limits" |
| 51 | } |
| 52 | incr index |
| 53 | } |