61c421bf |
1 | |
2 | puts "===== OCC1454 =====" |
3 | ####################################################################################### |
4 | # Improve performance of TDF_Label::FindChild |
5 | ####################################################################################### |
6 | |
7 | puts "Info: Open the document with 80000 sublabels of the label 0:2" |
9aa684ed |
8 | dchrono h reset |
9 | dchrono h start |
e837410d |
10 | Open [locate_data_file OCC1726.cbf] D |
9aa684ed |
11 | dchrono h stop |
12 | set TimeList [dchrono h show] |
13 | |
14 | regexp {Elapsed time: [-0-9.+eE]+ Hours ([-0-9.+eE]+) Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_min ElapsedTime_sec |
15 | regexp {CPU user time: ([-0-9.+eE]+) seconds} $TimeList full CPUusertime |
16 | regexp {CPU system time: ([-0-9.+eE]+) seconds} $TimeList full CPUsystemtime |
61c421bf |
17 | |
61c421bf |
18 | puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}" |
19 | |
20 | if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } { |
21 | puts "Elapsed time is more then 20.0 seconds - Faulty" |
22 | puts "Faulty OCC1454" |
23 | } elseif { ${CPUusertime} > 12 } { |
24 | puts "CPUusertime is more then 12 seconds - Faulty" |
25 | puts "Faulty OCC1454" |
26 | } elseif { ${CPUsystemtime} > 0.6 } { |
27 | puts "CPUsystemtime is more then 0.6 seconds" |
28 | puts "Faulty OCC1454" |
29 | } else { |
30 | puts "Elapsed time is less then 20 seconds - OK" |
31 | puts "CPU user time is less then 12 seconds - OK" |
32 | puts "CPU system time is less then 0.6 seconds - OK" |
33 | puts "OK for OCC1454" |
34 | } |