Differential Flame Graph enhancements: total-diff calculation and additional rendering customisation#329
Open
gielzak wants to merge 7 commits into
Open
Differential Flame Graph enhancements: total-diff calculation and additional rendering customisation#329gielzak wants to merge 7 commits into
gielzak wants to merge 7 commits into
Conversation
Author
|
I cleaned-up the pull-request message a bit. It'd be great if you could review this and let me know what you think. I'd be happy to add tests (it didn't seem straightforward to extend existing ones) and/or adjust the changes to suit your coding conventions / vision for the tool. The "total-diff" approach is more in line with what https://github.com/google/pprof would produce as diffs. Note that in the demos (linked in the pull-request message) you can switch between graphs using the buttons at the top:
Also, note that the pull-request is split into small commits (hopefully easier to review). Let me know what you think, and thank you for creating this awesome tool / approach to perf visualisation! |
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.
Overview:
This pull request introduces an opt-in total-diff calculation method for Differential Flame Graphs, complementing the existing self-diff approach. Additionally, it adds two new flags for diff rendering customisation.
TL;DR: see
Demossection belowProposed changes:
New flags:
--totaldiff: aggregates diff values (i.e. uses total-diff not self-diff) when calculating differential hues--mindeltapc NUM: min delta (as % of function duration) to use diff hues (allows to reduce noise from insignificant changes)--fillopacity NUM: fill-opacity for drawn rectangles (SVG attribute; helps with method name readability)Self-diff vs Total-diff:
Self-diff vs total-diff are based on self-time vs total-time. Basic example below:
f1: 25%;f2: 25%;f3: 25%;f4: 25%):f1: 20%;f2: 30%;f3: 10%;f4: 40%):Self-diff doesn't highlight the performance gain in
f1(25% -> 20%), while total-diff captures this. SeeDemossection below for illustration.Demos:
All hosted as interactive demos on https://gielzak.github.io/flamegraph-demos-totaldiff
Basic example:
Real code-change: