Skip to content

More UserInterfaceSystem metrics - #10

Merged
darkrell merged 4 commits into
ss14Starlight:masterfrom
redmushie:feature/bui-metrics
Jul 2, 2026
Merged

More UserInterfaceSystem metrics#10
darkrell merged 4 commits into
ss14Starlight:masterfrom
redmushie:feature/bui-metrics

Conversation

@redmushie

@redmushie redmushie commented Jul 1, 2026

Copy link
Copy Markdown

Description

Adds metrics to UserInterfaceSystem Update and SetState methods:

  • robust_bui_update_usage is the Update step broken down into 3 sub-phases with timing per phase.
  • robust_bui_set_state_usage is the SetState method per BUI state object type
  • robust_bui_range_check_usage is the parallel range check job from the Update method, per BUI enum key.

Adds CVar to enable these metrics:

  • metrics.granular_ui_system, default false.

Here's hoping this gives us enough info to find where our precious CPU time is going.

Reason

We're getting lag reports from users, and seeing this huge uptick in the UserInterfaceSystem update usage:

image

https://grafana.starlight.network/d/qyFqpFiGk2/perf-metrics?orgId=1&from=2026-07-01T08:08:45.015Z&to=2026-07-01T10:08:31.539Z&timezone=browser&var-Server=watchdog-starlight%2Fbeta-watchdog&viewPanel=panel-100

Some shifts it doesn't happen, some it's present almost the entire round (as shown here).

I've not been able to determine what UI causes this, hence more granular metrics for the SharedUserInterfaceSystem.

Please squash merge

@redmushie

redmushie commented Jul 1, 2026

Copy link
Copy Markdown
Author

Examples of resulting metrics.

robust_bui_range_check_usage_sum

Query rate(robust_bui_range_check_usage_sum[30s]), Legend {{bui}}

image

robust_bui_set_state_usage_sum

Query rate(robust_bui_set_state_usage_sum[30s]), Legend {{bui}}

image

robust_bui_update_usage_sum

Query rate(robust_bui_update_usage_sum[30s]), Legend {{phase}}

image

@darkrell
darkrell merged commit 7bf1873 into ss14Starlight:master Jul 2, 2026
5 of 7 checks passed
@redmushie
redmushie deleted the feature/bui-metrics branch July 2, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants