0024596: Slow import of IGES data
[occt.git] / tests / bugs / heal / bug24596_1
1 puts "============"
2 puts "OCC24596"
3 puts "============"
4 puts ""
5 ###############################
6 ## Slow import of IGES data
7 ###############################
8
9 pload QAcommands
10
11 cpulimit 2000
12
13 if { [regexp {Debug mode} [dversion]] } {
14   if { [regexp {Windows} [dversion]] } {
15     set max_time 900
16     set max_time2 500
17   } else {
18     set max_time 1200
19     set max_time2 800
20   }
21 } else {
22   if { [regexp {Windows} [dversion]] } {
23     set max_time 900
24     set max_time2 500
25   } else {
26     set max_time 1200
27     set max_time2 800
28   }
29 }
30
31 # 1 - igesread
32 dchrono h reset
33 dchrono h start
34
35 igesread [locate_data_file 100B_Nosecone_with_Triangular_FSS.igs] a 43479
36
37 dchrono h stop
38 set q [dchrono h show]
39
40 regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z
41 puts "$z"
42
43 if { $z > ${max_time} } {                                         
44     puts "Elapsed time of igesread is more than ${max_time} seconds - Faulty"
45 } else {
46     puts "Elapsed time of igesread is less than ${max_time} seconds - OK"
47 }
48
49 # 2 - checkshape
50 dchrono h2 reset
51 dchrono h2 start
52
53 checkshape a_1
54
55 dchrono h2 stop
56 set q2 [dchrono h2 show]
57
58 regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
59 puts "$z2"
60
61 if { $z2 > ${max_time2} } {                                         
62     puts "Elapsed time of checkshape is more than ${max_time2} seconds - Faulty"
63 } else {
64     puts "Elapsed time of checkshape is less than ${max_time2} seconds - OK"
65 }