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