1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/perf/vis/bug24623_2
ski 44fae8b193 0027691: Remove dchrono from all test cases and move its to perf group
Remove performance comparing with hardcoded value.
Test cases for performance of some commands were moved to perf group.

Updated documentation.
2017-01-19 17:24:46 +03:00

62 lines
1.5 KiB
Plaintext

puts "============"
puts "OCC24623_2"
puts "============"
puts ""
#######################################################################
puts "Visualization - improve selection mechanism"
# tests performance of selection algorithm. Creates a spiral via polyline
# and checks its selection in neutral point. For representative result,
# increase the number of points in POINTS_NUM and check time measurments
# in comparsion to previous OCCT versions.
#######################################################################
set POINTS_NUM 1000
set STEP 0.3
pload ALL
set aCoef 0.2
set aZ 0
# unset aPointCoords
list aPointCoords
for {set i 0} {$i < $POINTS_NUM} {incr i} {
set aX [expr $aCoef * $aZ * cos($aZ)]
set aY [expr $aCoef * $aZ * sin($aZ)]
set aZ [expr $aZ + $STEP]
lappend aPointCoords $aX
lappend aPointCoords $aY
lappend aPointCoords $aZ
}
vinit
set aMemInit [meminfo h]
puts "Initial mem: [expr $aMemInit / (1024 * 1024)] MiB ([expr $aMemInit])"
polyline p {*}$aPointCoords
vdisplay p
vfit
vmoveto 223 236
vmoveto 0 0
vmoveto 223 236
puts ""
puts "Applying transformations..."
vtranslateview 1 0 0
vrotate 100 100 100
puts ""
puts "Selection time after the transformations:"
dchrono aTimer restart
vmoveto 115 160
dchrono aTimer stop counter vmoveto_1
vmoveto 0 0
dchrono aTimer restart
vmoveto 115 160
dchrono aTimer stop counter vmoveto_2
set aMemSel [meminfo h]
puts "Selection mem: [expr $aMemSel / (1024 * 1024)] MiB ([expr $aMemSel])"
checkcolor 131 195 0 1 1