Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds basic profiling support to our long-running runtime servers so we can actually see what they’re doing while they’re running. We’re using
hotpathto profile both latency and memory usage of roles. It gives a pretty nice UII where you can inspect things like flamegraphs, memory consumption, thread activity, async task polling, and even channel state (note:async_channeland broadcast channels aren’t supported yet). This is useful for roles, it helps spot which functions are taking most of the time, where performance regresses over time, and how memory behaves under load.Profiling is behind feature flags, so there’s no overhead unless you turn it on:
hotpath→ time / CPU profilinghotpath-alloc→ memory profiling (This only works in single threaded context)To run:
cargo install hotpath --features='tui' hotpath consoleOnce the role is running with the feature enabled,
hotpath consolewill show a live view of what’s going on.UI looks something like this: