File: bug25532

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 (55 lines) | stat: -rw-r--r-- 1,504 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
puts "============"
puts "OCC25532"
puts "============"
puts ""
#######################################################################
# Visualization - fix cross-references between AIS_ConnectedInteractive
#                 and connected presentation
#######################################################################

pload MODELING VISUALIZATION
psphere s 0.5
tclean  s
incmesh s 0.001
trinfo  s

vinit View1
vclear
vaxo
vcaps -vbo 0
vsetdispmode 1
vdefaults absDefl=1.0
vautoactivatesel 0
set aMemInit [meminfo h]

set aNb 1000

# display as copies
eval compound [lrepeat $aNb s] ss
explode ss
for {set i 1} {$i <= $aNb} {incr i} { vdisplay -noupdate ss_${i}; vsetlocation -noupdate ss_${i} 0 0 s }
vfit
set aMemDisp1  [meminfo h]
vclear
set aMemClear1 [meminfo h]

# display as connected instances of single presentation
vconnectto i_1 0 0 0 s
for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 }
set aMemDisp2  [meminfo h]
vclear
set aMemClear2 [meminfo h]

puts "Initial memory:         [expr $aMemInit   / (1024 * 1024)] MiB"
puts "Displaying (simple):    [expr $aMemDisp1  / (1024 * 1024)] MiB"
puts "Clearing   (simple):    [expr $aMemClear1 / (1024 * 1024)] MiB"
puts "Displaying (connected): [expr $aMemDisp2  / (1024 * 1024)] MiB"
puts "Clearing   (connected): [expr $aMemClear2 / (1024 * 1024)] MiB"

set aRatio [expr $aMemClear2 / double($aMemClear1)]

# check if the memory difference is greater than 20%
if [expr $aRatio > 1.2] {
    puts "Error : TEST FAILED"
}