fix(debug-ui): plot frame time and timer FPS #1106

Merged
SakulFlee merged 5 commits from sakulflee/fix-debug-ui-frame-time into main 2026-11-12 21:30:21 +00:00 AGit
Owner

Summary

Fixes #1077.

  • The default performance graph now plots the timer's wall-clock frame delta (cdt_ms) as frame time, instead of the renderer-only render_total.
  • The FPS graph derives from the same wall-clock delta, so it no longer over-reports FPS by omitting update and surface acquisition.
  • Renamed the total CSV stage to render_total, and the FrameTimings history accessor from frame_ms to render_ms, so their scope is explicit.
  • render_total is no longer treated as a whole-frame budget.
  • Updated the CSV documentation, the analysis notebook, and the tests.

Verification

  • cargo test -p orbital_ecs_bridge -p orbital_debug_ui -p orbital_app
  • cargo clippy -p orbital_ecs_bridge -p orbital_debug_ui -p orbital_app --tests -- -D warnings
  • cargo fmt --all -- --check
## Summary Fixes #1077. - The default performance graph now plots the timer's wall-clock frame delta (`cdt_ms`) as **frame time**, instead of the renderer-only `render_total`. - The FPS graph derives from the same wall-clock delta, so it no longer over-reports FPS by omitting update and surface acquisition. - Renamed the `total` CSV stage to `render_total`, and the `FrameTimings` history accessor from `frame_ms` to `render_ms`, so their scope is explicit. - `render_total` is no longer treated as a whole-frame budget. - Updated the CSV documentation, the analysis notebook, and the tests. ## Verification - `cargo test -p orbital_ecs_bridge -p orbital_debug_ui -p orbital_app` - `cargo clippy -p orbital_ecs_bridge -p orbital_debug_ui -p orbital_app --tests -- -D warnings` - `cargo fmt --all -- --check`
The stage starts after update and surface acquisition, so calling it `total` made it look like the whole-frame duration. Rename the stage and the FrameTimings history field accordingly, and document that cdt_ms is the wall-clock frame period.
The default graph now plots the timer's wall-clock frame delta instead of the renderer-only render_total, and the FPS series is derived from that delta rather than 1000 / render_total. This makes the graph agree with the CSV fps column and stops update, surface acquisition and event-loop time from being dropped.

Render total is also no longer treated as a whole-frame budget, and its row keeps its own per-stage threshold.
docs(perf): distinguish frame time from render total
All checks were successful
Lint / lint (pull_request) Successful in 1m21s
PR / test (pull_request) Successful in 26m8s
aac1f6e0ef
Document that cdt_ms is the wall-clock frame period and render_total excludes update and surface acquisition. Update the notebook's stage filtering and fallback for the renamed CSV column.

Smart test results

Result: PASS

Scope: full workspace

Reason: unmapped change: Tools/performance/performance_report.ipynb

Elapsed: 14m 48s

Workflow run

Overall: 563 tests, 553 passed, 0 failed, 10 skipped

Nextest: 552 tests, 552 passed, 0 failed, 0 skipped
Doctests: 11 tests, 1 passed, 0 failed, 10 skipped

Outcome charts are split between nextest and doctests. The timing chart covers nextest only.

Crate Nextest Passed Failed Skipped Doctests Time
orbital 1 1 0 0 - 0.63s
orbital-cli 3 3 0 0 - 0.02s
orbital_2d 29 29 0 0 0/1 0.14s
orbital_app 25 25 0 0 0/1 0.12s
orbital_billboard 14 14 0 0 - 4.05s
orbital_camera 8 8 0 0 - 0.04s
orbital_core 2 2 0 0 - 0.01s
orbital_debug_render 2 2 0 0 0/1 0.01s
orbital_debug_ui 67 67 0 0 0/1 0.37s
orbital_ecs 114 114 0 0 0/2 0.66s
orbital_ecs_bridge 48 48 0 0 - 0.36s
orbital_file_manager 5 5 0 0 - 0.04s
orbital_iced 30 30 0 0 - 0.21s
orbital_importer_gltf 16 16 0 0 - 0.15s
orbital_input 11 11 0 0 - 0.05s
orbital_light 8 8 0 0 - 0.04s
orbital_macros 0 0 0 0 0/1 0.00s
orbital_material_shader 2 2 0 0 - 0.01s
orbital_math 4 4 0 0 - 0.02s
orbital_mesh 2 2 0 0 - 0.01s
orbital_procgeo 3 3 0 0 - 0.01s
orbital_render_graph 6 6 0 0 - 0.03s
orbital_renderer 28 28 0 0 - 0.22s
orbital_resources 30 30 0 0 - 0.19s
orbital_shader_core 0 0 0 0 1/1 0.00s
orbital_shader_pbr 4 4 0 0 - 0.02s
orbital_shader_preprocessor 12 12 0 0 - 0.06s
orbital_shadow 3 3 0 0 - 0.02s
orbital_text 15 15 0 0 0/1 0.39s
orbital_texture 11 11 0 0 - 0.06s
orbital_touch_ui 1 1 0 0 0/1 0.01s
orbital_ui 32 32 0 0 0/1 0.17s
orbital_world_environment 13 13 0 0 - 0.07s
template_all_in_one 3 3 0 0 - 0.01s
pie showData
    title Nextest outcomes
    "Passed" : 552
pie showData
    title Doctest outcomes
    "Passed" : 1
    "Skipped" : 10
xychart-beta
    title "Slowest crates (nextest seconds)"
    x-axis ["orbital_billboard", "orbital_ecs", "orbital", "orbital_text", "orbital_debug_ui", "orbital_ecs_bridge", "orbital_renderer", "orbital_iced"]
    y-axis "Seconds" 0 --> 4.1
    bar [4.05, 0.66, 0.63, 0.39, 0.37, 0.36, 0.22, 0.21]
<!-- orbital-ci-test-results --> ## Smart test results **Result:** PASS **Scope:** full workspace **Reason:** unmapped change: Tools/performance/performance_report.ipynb **Elapsed:** 14m 48s [Workflow run](https://forgejo.sakul-flee.de/SakulFlee/Orbital/actions/runs/1316) **Overall:** 563 tests, 553 passed, 0 failed, 10 skipped **Nextest:** 552 tests, 552 passed, 0 failed, 0 skipped **Doctests:** 11 tests, 1 passed, 0 failed, 10 skipped _Outcome charts are split between nextest and doctests. The timing chart covers nextest only._ | Crate | Nextest | Passed | Failed | Skipped | Doctests | Time | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | orbital | 1 | 1 | 0 | 0 | - | 0.63s | | orbital-cli | 3 | 3 | 0 | 0 | - | 0.02s | | orbital_2d | 29 | 29 | 0 | 0 | 0/1 | 0.14s | | orbital_app | 25 | 25 | 0 | 0 | 0/1 | 0.12s | | orbital_billboard | 14 | 14 | 0 | 0 | - | 4.05s | | orbital_camera | 8 | 8 | 0 | 0 | - | 0.04s | | orbital_core | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_debug_render | 2 | 2 | 0 | 0 | 0/1 | 0.01s | | orbital_debug_ui | 67 | 67 | 0 | 0 | 0/1 | 0.37s | | orbital_ecs | 114 | 114 | 0 | 0 | 0/2 | 0.66s | | orbital_ecs_bridge | 48 | 48 | 0 | 0 | - | 0.36s | | orbital_file_manager | 5 | 5 | 0 | 0 | - | 0.04s | | orbital_iced | 30 | 30 | 0 | 0 | - | 0.21s | | orbital_importer_gltf | 16 | 16 | 0 | 0 | - | 0.15s | | orbital_input | 11 | 11 | 0 | 0 | - | 0.05s | | orbital_light | 8 | 8 | 0 | 0 | - | 0.04s | | orbital_macros | 0 | 0 | 0 | 0 | 0/1 | 0.00s | | orbital_material_shader | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_math | 4 | 4 | 0 | 0 | - | 0.02s | | orbital_mesh | 2 | 2 | 0 | 0 | - | 0.01s | | orbital_procgeo | 3 | 3 | 0 | 0 | - | 0.01s | | orbital_render_graph | 6 | 6 | 0 | 0 | - | 0.03s | | orbital_renderer | 28 | 28 | 0 | 0 | - | 0.22s | | orbital_resources | 30 | 30 | 0 | 0 | - | 0.19s | | orbital_shader_core | 0 | 0 | 0 | 0 | 1/1 | 0.00s | | orbital_shader_pbr | 4 | 4 | 0 | 0 | - | 0.02s | | orbital_shader_preprocessor | 12 | 12 | 0 | 0 | - | 0.06s | | orbital_shadow | 3 | 3 | 0 | 0 | - | 0.02s | | orbital_text | 15 | 15 | 0 | 0 | 0/1 | 0.39s | | orbital_texture | 11 | 11 | 0 | 0 | - | 0.06s | | orbital_touch_ui | 1 | 1 | 0 | 0 | 0/1 | 0.01s | | orbital_ui | 32 | 32 | 0 | 0 | 0/1 | 0.17s | | orbital_world_environment | 13 | 13 | 0 | 0 | - | 0.07s | | template_all_in_one | 3 | 3 | 0 | 0 | - | 0.01s | ```mermaid pie showData title Nextest outcomes "Passed" : 552 ``` ```mermaid pie showData title Doctest outcomes "Passed" : 1 "Skipped" : 10 ``` ```mermaid xychart-beta title "Slowest crates (nextest seconds)" x-axis ["orbital_billboard", "orbital_ecs", "orbital", "orbital_text", "orbital_debug_ui", "orbital_ecs_bridge", "orbital_renderer", "orbital_iced"] y-axis "Seconds" 0 --> 4.1 bar [4.05, 0.66, 0.63, 0.39, 0.37, 0.36, 0.22, 0.21] ```
Merge remote-tracking branch 'origin/main' into fix/debug-ui-frame-time
Some checks failed
Lint / lint (pull_request) Successful in 1m22s
Templates / templates (pull_request) Failing after 4m57s
PR / test (pull_request) Successful in 15m6s
15a751eed9
Resolve the module_runtime import conflict by keeping STAGE_RENDER_TOTAL
and bringing in VolumetricSettings from main.
fix(cli): ship the all-in-one custom shader with generated projects
All checks were successful
Lint / lint (pull_request) Successful in 1m39s
Templates / templates (pull_request) Successful in 5m18s
PR / test (pull_request) Successful in 15m32s
0317aaba47
Sign in to join this conversation.
No description provided.