get_metrics() draw_calls / ui_elements / render counters read 0 in windowed builds #341
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
john/McRogueFace#341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during the Gauntlet benchmark implementation (#340, DESIGN.md deviation 4): in the 0.2.8 windowed Linux build,
mcrfpy.get_metrics()returns 0 fordraw_calls,ui_elements, and the per-frame render counters (grid_cells_rendered,entities_rendered), even mid-trial with thousands of live objects rendering.frame_time/fps/runtimework correctly (they drive the Gauntlet's scoring and HUD).Two other metric quirks documented in the same deviations list, worth resolving or documenting while in here:
frame_timeis in milliseconds despite the docstring saying seconds (docstring atsrc/McRFPy_API.cppget_metrics entry) — fix whichever side is wrong.fpsis a cumulative average since startup, not instantaneous; the Gauntlet derives instantaneous FPS fromframe_timeinstead. Consider documenting or adding an instantaneous field.Impact: the Gauntlet HUD displays draw calls honestly as 0 and scores on frame_time alone; the Phase 5.2 benchmarks and any future profiling work would benefit from these counters actually counting.
Likely area: the counters may only be incremented in code paths that were refactored during the GridView/chunk work, or the accumulate/reset happens after the Python-visible snapshot is taken. Verify in
src/GameEngine.cppmetrics plumbing and whereverdrawCallsis incremented.Related: #340 (Gauntlet), #255 (perf tracking).
Refinement (2026-07-11): now gates #346
Linked as a dependency of #346. The web-build profiling workflow designates the in-engine
ProfilerOverlay/ProfilingMetricsHUD as the one instrument identical across desktop and web — that claim is only true once these counters actually populate. Fixing this unblocks #346's central deliverable.Kept at tier2 as the paired near-term instrumentation push alongside numpy #337 (also bumped to tier2): numpy-native data views + working render counters are the two "make the agent environment measurable" pieces.