inferno icon indicating copy to clipboard operation
inferno copied to clipboard

add --total option. See https://github.com/brendangregg/FlameGraph/pu…

Open smitty3268 opened this issue 5 years ago • 5 comments

add --total option for generating the flame graph. see https://github.com/brendangregg/FlameGraph/pull/14 and https://github.com/jonhoo/inferno/issues/17.

The use case for this option is comparing multiple perf runs directly against one another. Specifying the # of samples to use for the total width means the individual rectangles in each graph can be directly compared to each other rather than being resized differently if one run finished more quickly than another.

smitty3268 avatar Dec 01 '19 01:12 smitty3268

This looks great, though it appears that it doesn't fully compile?

jonhoo avatar Dec 01 '19 15:12 jonhoo

Codecov Report

Merging #154 into master will decrease coverage by 0.13%. The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
- Coverage    88.4%   88.26%   -0.14%     
==========================================
  Files          16       16              
  Lines        2200     2208       +8     
==========================================
+ Hits         1945     1949       +4     
- Misses        255      259       +4
Impacted Files Coverage Δ
src/flamegraph/mod.rs 93.9% <22.22%> (-2.04%) :arrow_down:
src/collapse/common.rs 60.92% <0%> (+0.33%) :arrow_up:
src/flamegraph/color/palette_map.rs 92.92% <0%> (+0.88%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ef496bf...14f4168. Read the comment docs.

codecov[bot] avatar Dec 02 '19 00:12 codecov[bot]

Are there tests in the original PR too? If there are, would you mind porting them over? Otherwise, just copy an existing basic flamegraph test, run it with total, and commit the result.

jonhoo avatar Dec 02 '19 14:12 jonhoo

I'll take a look at adding a test, but it may be a few days before I have a chance.

This is my first pull request on github, does everything here look ok? In particular, do I need to clean up the commits in my fork, or is ok to just have them all there separately like they are now?

smitty3268 avatar Dec 03 '19 03:12 smitty3268

No rush — take whatever time you need :)

That's exciting! Yes, it looks all good. You can tidy up your commit history if you wish, but otherwise I'll just squash them all into one commit before merging. It's probably not worth doing a lot of commit tweaking for a change this small, and individual commits are easier to review anyway!

jonhoo avatar Dec 03 '19 18:12 jonhoo