-
Notifications
You must be signed in to change notification settings - Fork 128
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
Replace the custom flamegraph viewer with speedscope #100
Open
jlfwong
wants to merge
10
commits into
tmm1:master
Choose a base branch
from
jlfwong:jlfwong/speedscope
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5aa74f7
Remove old flamegraph viewer
0103364
Update sample.rb to be usable for outputting a flamegraph
7ab9f9e
Import speedscope and include instructions on how to update it
c64829b
Integrate into the stackprof command
f705bfe
Actually open the browser
71aa3e3
Upgrade to speedscope 0.1.2
ee4b6b6
Retain the original switches
bd69ced
Switch to a single file build
78ef0a9
Update to a version which does not use eval
213b8e6
Add missing txt file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am personally 👎 on this options consolidation change (not that I have any real pull in the final say...)
Reason being is I have used this to integrate with other repos, and having this in two separate steps is kind of ideal when you want to just save it to a path your your choosing (currently this forces the use of
Tmpdir
), and open at your convenience. Allowing you to choose a dir also allows you to organize your samples, even when using the privateStackprof.print_flamegraph
interface, and now that is not available.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To maybe meet halfway:
Could you keep the options that exist currently, but change
--flamegraph-viewer
to optionally accept afile
, and if one isn't provided, it will run a form of theTmpdir
code you currently have and open the file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I don't have strong opinions here, and happy to do whatever would yield the best user experience here.
Open to guidance for what the commandline flags should be here and what the semantics should be.
My understanding is that if you want to collect multiple profiles for later viewing, you can collect them as the raw stackprof output into a directory of your choosing, then run the
--flamegraph
command to view them. I'm not sure what you would want to do with the intermediate form here other than open them to view as a flamegraph.The intermediate form is a JavaScript ball that isn't usable (AFAIK) from anything except the flamegraph viewer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always kind of thought of the
--flamegraph
flag command as the "compile" step of the flamegraph, and the--flamegraph-viewer
flag as the execution. The "compile" step could be slow, depending on how big your stackprof blob is (you were talking about 100MB blobs, and I know the feeling myself), you might not want to repeat that process if you are looking at data over time, or with a before and after.Sidenote (and I am NOT suggesting doing this in this PR), in regards to the "Javascript ball" being unusable, I have wondered if it made sense to have a option flag to make it a single
.html
file artifact instead of javsacript file but inlining the scripts (sospeedscope
in this case). Seems like it would avoid the wholeviewer
issue, and it is what the originalperl
version of theflamegraph
does as well by making it an SVG.There was a problem hiding this comment.