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 start/stop and options to README #68

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

joshuay03
Copy link
Collaborator

I'm uncertain about a few changes, see comments.

@joshuay03 joshuay03 force-pushed the update-readme branch 2 times, most recently from 9eff8ef to b2166b0 Compare May 5, 2024 23:54
@@ -68,6 +86,14 @@ ruby -r vernier -e 'Vernier.trace_retained(out: "irb_profile.json") { require "i

Retained-memory flamegraphs must be interpreted a little differently than a typical profiling flamegraph. In a retained-memory flamegraph, the x-axis represents a proportion of memory in bytes, _not time or samples_ The topmost boxes on the y-axis represent the retained objects, with their stacktrace below; their width represents the percentage of overall retained memory each object occupies.

### Options
Copy link
Collaborator Author

@joshuay03 joshuay03 May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure if we wanted to add hooks here. The only one I could find seems to be more of an private hook for supporting Rails, and this implies it's a private API.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine having more hooks and user supplied hooks, but I'm not quite sure the best API for it yet

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to hold off on adding it to the README then?


Option | Description
:- | :-
`mode` | The sampling mode to use. One of `:wall`, `:retained` or `:custom`. Default is `:wall`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure how the custom collector is meant to be used, I'm guessing the native implementation is meant to be extended? Let me know if it shouldn't be included here just yet / if there's more information that can be added.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing nobody has used it, and I'd probably implement it differently today, the intention was to be like stackprof's :custom mode where you call StackProf.sample at times you want to measure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right. Similar to the hooks, I'll remove the :custom option from this list for now and it can be added in once implementation has been finalised.

@jhawthorn jhawthorn merged commit 32017d3 into jhawthorn:main Jun 4, 2024
7 checks passed
@jhawthorn
Copy link
Owner

@joshuay03 Thanks again for the improvements, I sent you a commit bit if you'd like to do more. It was great to see you at RubyKaigi!

@joshuay03
Copy link
Collaborator Author

I sent you a commit bit if you'd like to do more. It was great to see you at RubyKaigi!

It was great to meet you too. And thank you very much, I appreciate it. I'd love to help out more!

@joshuay03 joshuay03 deleted the update-readme branch June 4, 2024 06:50
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