Skip to content

Commit

Permalink
docs(example): add stats to pv/wavelet example
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Oct 21, 2022
1 parent 792dd28 commit c257a54
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions examples/07_paraview/Wavelet/app.py
Expand Up @@ -4,7 +4,7 @@

from trame.app import get_server, asynchronous
from trame.ui.vuetify import SinglePageWithDrawerLayout
from trame.widgets import vuetify, trame, html, paraview
from trame.widgets import vuetify, trame, html, paraview, rca

# -----------------------------------------------------------------------------
# Global helpers
Expand Down Expand Up @@ -501,14 +501,26 @@ def ui_state_target_fps_change(self, target_fps, **kwargs):
classes="text-caption",
)
vuetify.VDivider()
# with vuetify.VCardText(style="height: 150px"):
# rca.StatisticsDisplay(
# name="view",
# fps_delta=1.5,
# stat_window_size=10,
# history_window_size=30,
# reset_ms_threshold=100,
# )
with vuetify.VCardText(style="height: 150px"):
rca.StatisticsDisplay(
name="view",
fps_delta=1.5,
stat_window_size=10,
history_window_size=30,
reset_ms_threshold=100,
ws_topic="viewport.image.push.subscription",
packet_decorator=(
"""
(v) => {
return {
name: 'view',
serverTime: Date.now(),
contentSize: v.memsize,
};
}
""",
),
)

with vuetify.VCard(classes="my-2 mx-1"):
with vuetify.VCardTitle(classes="py-0"):
Expand Down

0 comments on commit c257a54

Please sign in to comment.