Skip to content

[Feature Request]: Add CPU usage to host Metrics #6910

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

Open
marshalleq opened this issue May 28, 2025 · 1 comment
Open

[Feature Request]: Add CPU usage to host Metrics #6910

marshalleq opened this issue May 28, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@marshalleq
Copy link

marshalleq commented May 28, 2025

Platform

Cross-Platform

Description

I realise there can be a slight performance penalty for this which is why I think it should be more like an opt in toggle for debugging, however I'm interested to know how for example a high site node is performing and whether cpu is a bottleneck, in particular on the single core low power devices.

Would it be possible to get this added in somewhere?

It's my understanding this could potentially be implemented by leveraging FreeRTOS's run-time statistics capabilities (detailed at https://www.freertos.org/Documentation/02-Kernel/02-Kernel-features/08-Run-time-statistics), which involves enabling configGENERATE_RUN_TIME_STATS and configuring the associated timer macros.

Thanks.

@marshalleq marshalleq added the enhancement New feature or request label May 28, 2025
@mverch67
Copy link
Collaborator

mverch67 commented May 29, 2025

I would expect the arduino loop() polling to eat up 100% CPU all the time and therefore doesn't let the FreeRTOS idle task run to count its idle time.
A solution would require to measure the runtime of a single loop walkthrough and to calculate according expected runtime (based on actual CPU and frequency) an estimated "idle" time / percentage value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants