0026321: Crash in BRepMesh_FastDiscret::Add
[occt.git] / tests / bugs / moddata_3 / bug25487_1
CommitLineData
150e93a7 1puts "========"
2puts "OCC25487"
3puts "========"
4puts ""
5##########################################
6# Extrema_GenExtPS needs to be optimized
7##########################################
8
9pload DATAEXCHANGEKERNEL
10
11# Restore testing shape and get timing characteristics for operation stepread
12dchrono perf_h reset
13dchrono perf_h start
14stepread [locate_data_file OCC25487_LP1.stp] a *
15dchrono perf_h stop
16
17# Get elapsed time for operation stepread
18set chrono_info [dchrono perf_h show]
19regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
20puts "Elapsed time is: $CPU_time"
21
22# Check current OS
23set currentOS $tcl_platform(os)
24
25# Check prformance on Windows
26if {[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
51if {[string compare $currentOS "Linux"] == 0} {
52 if {[regexp {Debug mode} [dversion]]} {
53 # DEBUG mode
e159a668 54 # initial CPU_time for LINUX in DEBUG mode is 900 sec
150e93a7 55 puts "Checking LINUX performance in debug mode..."
e159a668 56 if {$CPU_time > 900.} {
150e93a7 57 puts "ERROR: OCC25487 is reproduced."
e159a668 58 puts " Low performance: $CPU_time (but should be less than 900 sec)"
150e93a7 59 } else {
60 puts "Done!"
61 }
62 } else {
63 # OPTIMIZE mode
e159a668 64 # initial CPU_time for LINUX in OPTIMIZE mode is 190 (173+17) sec
150e93a7 65 puts "Checking LINUX performance in optimize mode..."
e159a668 66 if {$CPU_time > 190.} {
150e93a7 67 puts "ERROR: OCC25487 is reproduced."
e159a668 68 puts " Low performance: $CPU_time (but should be less than 190 sec)"
150e93a7 69 } else {
70 puts "Done!"
71 }
72 }
73}