File: bug1454

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (34 lines) | stat: -rw-r--r-- 1,425 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

puts "===== OCC1454 ====="
#######################################################################################
# Improve performance of TDF_Label::FindChild
#######################################################################################

puts "Info: Open the document with 80000 sublabels of the label 0:2"
dchrono h reset
dchrono h start
Open [locate_data_file OCC1726.std] D
dchrono h stop
set TimeList [dchrono h show]

regexp {Elapsed time: [-0-9.+eE]+ Hours ([-0-9.+eE]+) Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_min ElapsedTime_sec
regexp {CPU user time: ([-0-9.+eE]+) seconds} $TimeList full CPUusertime
regexp {CPU system time: ([-0-9.+eE]+) seconds} $TimeList full CPUsystemtime

puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}"

if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } {
  puts "Elapsed time is more then 20.0 seconds - Faulty"
  puts "Faulty OCC1454"
} elseif { ${CPUusertime} > 12 } {
    puts "CPUusertime is more then 12 seconds - Faulty"
    puts "Faulty OCC1454"
} elseif { ${CPUsystemtime} > 0.6 } { 
    puts "CPUsystemtime is more then 0.6 seconds"
    puts "Faulty OCC1454"
} else {
    puts "Elapsed time is less then 20 seconds - OK"
    puts "CPU user time is less then 12 seconds - OK"
    puts "CPU system time is less then 0.6 seconds - OK"
    puts "OK for OCC1454"
}