Skip to content

[embassy-executor] Add two new trace hooks, improve docs#4033

Merged
Dirbaio merged 7 commits into
embassy-rs:mainfrom
jamesmunns:james/upstream-trace
Apr 2, 2025
Merged

[embassy-executor] Add two new trace hooks, improve docs#4033
Dirbaio merged 7 commits into
embassy-rs:mainfrom
jamesmunns:james/upstream-trace

Conversation

@jamesmunns
Copy link
Copy Markdown
Contributor

@jamesmunns jamesmunns commented Apr 1, 2025

This is an extension of the trace interface that adds two new hooks:

  1. _embassy_trace_poll_start - used to mark the time AFTER executor polling starts, but BEFORE task polling starts. This is usable for measuring overhead of the scheduler algorithm itself.
  2. _embassy_trace_task_end - used to mark the end of a task, at the time of dropping the contained future and freeing the associated space.

I've also added quite a bit of docs.

EDIT: this is a breaking change, but fine because #4033 (comment)

@jamesmunns jamesmunns requested review from Dirbaio and lulf April 1, 2025 12:10
@Dirbaio
Copy link
Copy Markdown
Member

Dirbaio commented Apr 1, 2025

I'd just say it's stable (or not say anything, it's implied it's stable). No need to worry about compat, next release is going to be breaking anyway because of #4020.

@jamesmunns
Copy link
Copy Markdown
Contributor Author

@Dirbaio removed that section!

@jamesmunns
Copy link
Copy Markdown
Contributor Author

@Dirbaio any objections to me hitting merge?

@Dirbaio
Copy link
Copy Markdown
Member

Dirbaio commented Apr 2, 2025

yolo

@Dirbaio Dirbaio added this pull request to the merge queue Apr 2, 2025
Merged via the queue into embassy-rs:main with commit a137a16 Apr 2, 2025
@jamesmunns jamesmunns deleted the james/upstream-trace branch April 2, 2025 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants