Expand description
Frame-rate HUD for interactive performance testing. Frame-rate HUD for interactive performance testing.
GPUI (at the pinned revision) ships no FPS widget, so this module provides a minimal one with zero forced repaints:
FrameStatssamples one timestamp per rendered frame and reports rolling FPS plus average/worst frame times over a short window.fps_badgerenders those stats as a color-coded chip hosts can drop into any status bar.
The editor canvas records a sample on every prepaint
(crate::Editor::frame_stats), so the number reflects real editor
frames: it updates while interacting (typing, selection drags,
scrolling) and freezes when idle — which is correct, since no frames are
being produced then.
Structs§
- Frame
Stats - Rolling frame-time statistics sampled once per rendered frame.
Functions§
- fps_
badge - Renders
FrameStatsas a color-coded status-bar chip.