-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flamegraph display in the presence of --diff_base.
Previously, the flamegraph display was broken in the presence of `--diff_base` because it did not account for the fact that some stacks could have negative values. This change fixes the handling of negative values by tracking two numbers per displayed box that covers a set of stacks: 1. `sumpos`: the sum of the absolute values of increases in the stacks. 2. `sumneg`: the sum of the absolute values of decreases in the stacks. The width of the box is proportional to `sumpos + sumneg`. In addition, if a box has an overall decrease (`sumneg > sumpos`), the fraction of the box corresponding to the decrease is shaded green. (Similarly part of the box is shaded red if the box has an overall increase.) Changed the display of legends and tooltips to clearly show the added and removed samples. E.g., the following shows that the cost of `Function` changed from `1.44s` to `1.3s` as well as the net change and the corresponding percentages. ``` 0.14s (-1.8%) │ 1.44s (18.3%) 🠆 1.3s (16.5%) │ Function ``` Documented some of the Javascript types used for flamegraph rendering.
- Loading branch information
Showing
3 changed files
with
147 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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