Skip to content

Add frametime coefficient of variation metric - #2098

Open
OursCodeur wants to merge 1 commit into
flightlessmango:masterfrom
OursCodeur:fps-metrics-cv
Open

Add frametime coefficient of variation metric#2098
OursCodeur wants to merge 1 commit into
flightlessmango:masterfrom
OursCodeur:fps-metrics-cv

Conversation

@OursCodeur

Copy link
Copy Markdown

Closes #2023.

Hello ! This adds cv to fps_metrics. It reports the population standard deviation divided by mean frametime for the current sample window, as a percentage. Lower values indicate steadier frametimes.

The metric is shown with two decimal places and a percent suffix in both the regular HUD and the post-logging benchmark overlay. The percent suffix remains visible when hide_fps_superscript is enabled, since otherwise the value could be mistaken for FPS.

The calculation uses a double-precision two-pass implementation, configurations containing only cv skip the percentile copy and sort (the first presentation is excluded because it has no previous presentation timestamp).

README and sample configuration document the new token. Perf-wise at the 10,000-sample cap, CV arithmetic adds roughly 12–14 µs; a CV-only calculation takes approximately 24.6 µs end to end on an i7-13700KF.

I left the benchmark CSV schema unchanged. If CV should be exported there as well, how would you prefer the column to be represented and ordered?

Cheers

mangohud_CV

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.

[FEATURE REQUEST] Add frametimes relative standard deviation (Coefficient of Variation) measurement

1 participant