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 a (optional) way to measure CPU load on Cortex M executor #2759

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

spcan
Copy link

@spcan spcan commented Apr 1, 2024

This PR adds an opt-in way to create an Executor with very basic CPU load measurements. An example for the STM32F7 MCU is included.

Pros:

  • Builtin method that measures CPU load of a poll cycle
  • Each executor has its own independent measurement, no synchronization needed
  • It's opt-in, no changes to the executor if the feature is not used
  • No additional dependencies

Cons:

  • Adds a small delay before the executor starts polling and before the executor goes to sleep
  • The data provided is very simple, the user must implement their own logic to use the data properly
  • Not compatible with #[embassy_executor::main] macro

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.

None yet

1 participant