Add Fiber Running / Fiber Switch events to the marker chart #107
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.
Fiber Running and Fiber Switch events give us information about what Fibers in the system are doing. The Fiber Running span in the marker chart allow us to easily select work that a particular Fiber is doing, where the Fiber Switch event allows us to identify why a Fiber changed.
Here is a sample program we'll profile with Vernier:
The sample program has one Fiber that is CPU bound. It's calculating Fib in a loop. The other Fiber is simulating IO work by calling
sleep
.Here I've highlighted the marker where we have one Fiber using the CPU for a long time:
Selecting that marker lets us verify that in fact it's spending time calculating Fib: