0025487: Extrema_GenExtPS needs to be optimized
[occt.git] / tests / bugs / moddata_3 / bug25487_1
1 puts "========"
2 puts "OCC25487"
3 puts "========"
4 puts ""
5 ##########################################
6 # Extrema_GenExtPS needs to be optimized
7 ##########################################
8
9 pload DATAEXCHANGEKERNEL
10
11 # Restore testing shape and get timing characteristics for operation stepread
12 dchrono perf_h reset
13 dchrono perf_h start
14 stepread [locate_data_file OCC25487_LP1.stp] a *
15 dchrono perf_h stop
16
17 # Get elapsed time for operation stepread
18 set chrono_info [dchrono perf_h show]
19 regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
20 puts "Elapsed time is: $CPU_time"
21
22 # Check current OS
23 set currentOS $tcl_platform(os)
24
25 # Check prformance on Windows
26 if {[string compare $currentOS "Windows NT"] == 0} {
27   if {[regexp {Debug mode} [dversion]]} {
28     # DEBUG mode
29     # initial CPU_time for WINDOWS in DEBUG mode is 410 ((186+19)*2) sec
30     puts "Checking WINDOWS performance in debug mode..."
31     if {$CPU_time > 410.} {
32       puts "ERROR: OCC25487 is reproduced."
33       puts "       Low performance: $CPU_time (but should be less than 410 sec)"
34     } else {
35       puts "Done!"
36     }
37   } else {
38     # OPTIMIZE mode
39     # initial CPU_time for WINDOWS in OPTIMIZE mode is 205 (186+19) sec
40     puts "Checking WINDOWS performance in optimize mode..."
41     if {$CPU_time > 205.} {
42       puts "ERROR: OCC25487 is reproduced."
43       puts "       Low performance: $CPU_time (but should be less than 205 sec)"
44     } else {
45       puts "Done!"
46     }
47   }
48 }
49
50 # Check performance on Linux
51 if {[string compare $currentOS "Linux"] == 0} {
52   if {[regexp {Debug mode} [dversion]]} {
53     # DEBUG mode
54     # initial CPU_time for LINUX in DEBUG mode is 292 ((132+14)*2) sec
55     puts "Checking LINUX performance in debug mode..."
56     if {$CPU_time > 292.} {
57       puts "ERROR: OCC25487 is reproduced."
58       puts "       Low performance: $CPU_time (but should be less than 292 sec)"
59     } else {
60       puts "Done!"
61     }
62   } else {
63     # OPTIMIZE mode
64     # initial CPU_time for LINUX in OPTIMIZE mode is 146 (132+14) sec
65     puts "Checking LINUX performance in optimize mode..."
66     if {$CPU_time > 146.} {
67       puts "ERROR: OCC25487 is reproduced."
68       puts "       Low performance: $CPU_time (but should be less than 146 sec)"
69     } else {
70       puts "Done!"
71     }
72   }
73 }