-
Notifications
You must be signed in to change notification settings - Fork 49
Implement a summarization tool for profile traces #17
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
Conversation
Output is currently just: {event}- {total time}
Thanks, @wesleywiser! I hope to be able to take a closer look at this mid-next week. |
Looks great, thanks @wesleywiser! I don't quite understand how the self-time is computed. Could you add some comments explaining the principle in more detail? |
The key is this bit here: measureme/summarize/src/analysis.rs Lines 109 to 113 in 72e0cad
Let's look at a simple example with two events:
When processing this, we see the events like this:
Now, I'll add some annotation to these events to show what's happening in the code:
As a result: Event 2's self-time is I'll add this as a comment to the file tonight. |
@michaelwoerister I added some constants for the rustc event kinds and also copied a modified version of the above comment explaining how self-timing works into the analysis function. I believe this should be ready to go. |
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 adding the comments!
r? @michaelwoerister
Example output
Processing the 76mb output from running
-Z self-profile
on the regex crate takes 0.6 seconds.