Visualization options for easier viewing#345
Open
willhansen wants to merge 2 commits intojonhoo:mainfrom
Open
Conversation
--include-children
- When present, each frame of a differential flamegraph will be
coloured according to the sum of all of that frame's children
- Very useful when many small functions collectively impact
performance
--frame-width-source
- Chooses the frame widths of differential frame graphs, removing
need to generate two different graphs every time
- Possible values (taking A and B as the first and second sample
counts for each stack):
- "before": A
- "after": B
- "difference": abs(A-B)
- "common": min(A, B)
- "allsamples": A+B
- "max": max(A, B)
--detailed-tooltips
- Provides more information in the tooltips of differential
flamegraphs
--normalize
- Normalizes each stack sample count so that the total sample count of the
two measurements does not interfere with comparison
- Unlike the stack diff tool, uses floating point numbers
to better handle single sample stacks
Add nix flake for dev shell
jonhoo
requested changes
Jul 19, 2025
Owner
jonhoo
left a comment
There was a problem hiding this comment.
Thank you!
I'm not opposed to any of these changes necessarily, though it's very hard to review this with four different features (five when you count nix) all intermingled in the same PR. Could you instead please open a dedicated PR for each PR?
| }; | ||
| if opt.negate_differentials { | ||
| delta_pct_pt = -delta_pct_pt; | ||
| // std::mem::swap(&mut frame_count_before, &mut frame_count_after); |
Owner
There was a problem hiding this comment.
This seems to be leftover from debugging?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add four new options:
--include-children--frame-width-sourcebefore: Aafter: Bdifference: abs(A-B)common: min(A, B)all-samples: A+Bmax: max(A, B)--detailed-tooltips--normalizeAdd nix flake for dev shell