0027146: Create command checkplatform
[occt.git] / tests / bugs / modalg_5 / bug25413
CommitLineData
6fb3418e 1puts "========"
2puts "OCC25413"
3puts "========"
4puts ""
5#############################################################
6# Line-Shape intersection algorithm became 400 times slower
7#############################################################
8
9pload QAcommands
10
11restore [locate_data_file bug25413.brep] w
12
13dchrono perf_h reset
14dchrono perf_h start
15OCC25413 w
16dchrono perf_h stop
17
18set chrono_info [dchrono perf_h show]
19
20regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
21puts "Elapsed time is: $CPU_time"
22
863f782a 23if { [checkplatform -windows] } {
6fb3418e 24 if {[regexp {Debug mode} [dversion]]} {
25 # initial CPU_time for WINDOWS in DEBUG mode is 90 sec
26 puts "Checking WINDOWS performance in debug mode..."
27 if {$CPU_time > 90.} {
28 puts "ERROR: OCC25413 is reproduced."
29 puts " Low performance: $CPU_time (but should be less than 90 sec)"
30 } else {
31 puts "Done!"
32 }
33 } else {
34 puts "Checking WINDOWS performance in optimize mode..."
35 # initial CPU_time for WINDOWS in OPTIMIZE mode is 30 sec
36 if {$CPU_time > 30.} {
37 puts "ERROR: OCC25413 is reproduced."
38 puts " Low performance: $CPU_time (but should be less than 30 sec)"
39 } else {
40 puts "Done!"
41 }
42 }
863f782a 43} else {
6fb3418e 44 if {[regexp {Debug mode} [dversion]]} {
45 # initial CPU_time for LINUX in DEBUG mode is 90 sec
46 puts "Checking LINUX performance in debug mode..."
47 if {$CPU_time > 90.} {
48 puts "ERROR: OCC25413 is reproduced."
49 puts " Low performance: $CPU_time (but should be less than 90 sec)"
50 } else {
51 puts "Done!"
52 }
53 } else {
54 puts "Checking LINUX performance in optimize mode..."
55 # initial CPU_time for LINUX in OPTIMIZE mode is 30 sec
56 if {$CPU_time > 30.} {
57 puts "ERROR: OCC25413 is reproduced."
58 puts " Low performance: $CPU_time (but should be less than 30 sec)"
59 } else {
60 puts "Done!"
61 }
62 }
63}