File: bug5023

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 (39 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (6)
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
35
36
37
38
39
puts "================"
puts "OCC5023"
puts "================"
puts ""
######################################################
# Performance regression in opening OCAF file
######################################################

set aFile [locate_data_file OCC5023.std]

puts "Info: Restore the document"

if [info exists DD] {
    catch {Close DD}; unset DD
}

dchrono h reset
dchrono h start

Open ${aFile} DD
dchrono h stop
set list [dchrono h show]
Close DD

regexp {CPU user time: +([-0-9.+eE]+)} $list full CPU_user_time

set Good_CPU_user_time 2.

set CPU_user_time_percent [expr (${CPU_user_time} - ${Good_CPU_user_time}) / ${Good_CPU_user_time} * 100.]
set percent_max 0.1

puts "CPU_user_time = ${CPU_user_time}"
puts "Good_CPU_user_time = ${Good_CPU_user_time}"
puts "CPU_user_time_percent = ${CPU_user_time_percent}"

if {${CPU_user_time_percent} > ${percent_max}} {
    puts "Faulty OCC5023 : CPU user time is wrong"
}