-
Notifications
You must be signed in to change notification settings - Fork 935
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
Performance Observability #3924
Comments
You can enable the trace feature in the executor which will involve some callbacks when scheduling tasks etc. (See the trace rs in the executor source for more info). As an extension of that there is the rtos-trace feature which integrates with System view of youre using that |
Thanks! Do you know of any options that are not RTOS-based? |
@lulf Could you help walk me through how to use trace.rs? I have enabled it via the feature flag /home/X/embassy/embassy-executor/src/raw/trace.rs:17:(.text._ZN16embassy_executor3raw5trace8task_new17h04e7ee5e821644b7E+0x25): undefined reference to `_embassy_trace_task_new' |
You need to define the functions that gets called by the executor, it is quite low level. I can publish some more code on that later, but for now:
So, you can for instance check how long time a task runs by measuring the time between exec_end and exec_begin for a given executor id and task id. I have some code to generate a trace, but you could also just defmt::info!("{} {} {}", executor, task, Instant::now().as_ticks()); and you should get the ticks when each of these events happen in the log and you can process the information later. |
@lulf thanks for clarifying. I'm getting the same undefined symbol error when I enable |
What are the best practices for measuring performance? Are there any tools or crates that can provide event-based diagnostic information like a trace? I'm looking for something that can measure whether tasks are being blocked or not.
The text was updated successfully, but these errors were encountered: