Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPU and memory usage to the performance metrics overlay #329

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

rdw-software
Copy link
Member

Both are estimates and not expected to be 100% accurate due to various complexities like multithreading/C++ vs Lua etc.

The primary goal is to detect excessive resource usage and other "obvious" outliers, such as huge memory leaks or delays.

The code originally assumes time (in milliseconds), which doesn't allow for displaying RAM usage or other metrics. Since time is a sensible default, overriding the format for specific items seems generalized enough for now.

A better approach might be to allow passing formatter functions and using tables instead of varargs (to be order-independent). But it's probably not needed, so defer until there's a reason to generalize further.
This isn't necessarily accurate due to multithreading concerns. While it serves to detect performance outliers, it's not indicative of the actual system load (by design).
@rdw-software rdw-software merged commit 576b7f0 into main Jan 25, 2024
5 checks passed
@rdw-software rdw-software deleted the perf-metrics-upgrade branch January 25, 2024 02:24
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.

1 participant