Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

smitty3268
Copy link

add --total option for generating the flame graph. see brendangregg/FlameGraph#14 and #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.

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.
jonhoo
jonhoo previously approved these changes Dec 1, 2019
@jonhoo
Copy link
Owner

jonhoo commented Dec 1, 2019

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

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.
@codecov
Copy link

codecov bot commented Dec 2, 2019

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%) ⬇️
src/collapse/common.rs 60.92% <0%> (+0.33%) ⬆️
src/flamegraph/color/palette_map.rs 92.92% <0%> (+0.88%) ⬆️

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.

@jonhoo
Copy link
Owner

jonhoo commented Dec 2, 2019

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.

@smitty3268
Copy link
Author

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?

@jonhoo
Copy link
Owner

jonhoo commented Dec 3, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants