352ffd73 |
1 | puts "================" |
2 | puts "OCC5023" |
3 | puts "================" |
4 | puts "" |
5 | ###################################################### |
6 | # Performance regression in opening OCAF file |
7 | ###################################################### |
8 | |
9 | set aFile [locate_data_file OCC5023.std] |
10 | |
11 | puts "Info: Restore the document" |
12 | |
13 | if [info exists DD] { |
14 | catch {Close DD}; unset DD |
15 | } |
16 | |
17 | dchrono h reset |
18 | dchrono h start |
19 | |
20 | Open ${aFile} DD |
21 | dchrono h stop |
22 | set list [dchrono h show] |
23 | Close DD |
24 | |
25 | regexp {CPU user time: +([-0-9.+eE]+)} $list full CPU_user_time |
26 | |
27 | set Good_CPU_user_time 2. |
28 | |
29 | set CPU_user_time_percent [expr (${CPU_user_time} - ${Good_CPU_user_time}) / ${Good_CPU_user_time} * 100.] |
30 | set percent_max 0.1 |
31 | |
32 | puts "CPU_user_time = ${CPU_user_time}" |
33 | puts "Good_CPU_user_time = ${Good_CPU_user_time}" |
34 | puts "CPU_user_time_percent = ${CPU_user_time_percent}" |
35 | |
36 | if {${CPU_user_time_percent} > ${percent_max}} { |
37 | puts "Faulty OCC5023 : CPU user time is wrong" |
38 | } |
39 | |