Adjusting testing case for debug mode
[occt.git] / tests / bugs / caf / bug2793
CommitLineData
d77256d1 1puts "=========="
2puts "OCC2793"
3puts "=========="
4puts ""
5########################################################################
6# BinOcaf: low performance saving documents with large attributes
7########################################################################
8
9NewDocument D MDTV-Standard
10
11# Loaded shapes for attributes
12restore [locate_data_file Radhaus.brep] shape1
13restore [locate_data_file shading_wrongshape_009.brep] shape2
14restore [locate_data_file FORM-11.brep] shape3
15restore [locate_data_file OCC22759-weldt6.brep] shape4
16restore [locate_data_file BPLSEITRE.brep] shape5
17restore [locate_data_file OCC22302.brep] shape6
18restore [locate_data_file ROVER.brep] shape7
19restore [locate_data_file bug24083_polyline.brep] shape8
20
21# Create a label
22set lab1 [Label D 0:2]
23set lab2 [Label D 0:3]
24set lab3 [Label D 0:4]
25set lab4 [Label D 0:5]
26set lab5 [Label D 0:6]
27set lab6 [Label D 0:7]
28set lab7 [Label D 0:8]
29set lab8 [Label D 0:9]
30
31# Load shapes on labels
32NewShape D ${lab1} shape1
33NewShape D ${lab2} shape2
34NewShape D ${lab3} shape3
35NewShape D ${lab4} shape4
36NewShape D ${lab5} shape5
37NewShape D ${lab6} shape6
38NewShape D ${lab7} shape7
39NewShape D ${lab8} shape8
40
41# Save document
42file delete -force ${imagedir}/2793.cbf
43dchrono h reset
44dchrono h start
45SaveAs D ${imagedir}/2793.cbf
46dchrono h stop
47Close D
48
49# Check
50set info [dchrono h show]
51regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time
95f8573c 52
53set max_time 100
54if { [regexp {Debug mode} [dversion]] } {
55 set max_time 200
56}
57
58if { $cpu_time > ${max_time} } {
d77256d1 59 puts "Error: performance saving document D is too low"
60} else {
61 puts "OK: performance saving document D is high"
62}