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 and stop methods for when code isn't conveniently block wrappable #1

Open
technicalpickles opened this issue Jan 23, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@technicalpickles
Copy link
Collaborator

stackprof supports using start / stop in addition to the block usage. This is helpful for when things aren't cleanly block wrapped.

cc @baweaver who requested it

@technicalpickles technicalpickles added the enhancement New feature or request label Jan 23, 2023
@nate-at-gusto
Copy link

This would help profiling Rails boot too

@technicalpickles
Copy link
Collaborator Author

@nate-at-gusto how are you thinking you'd use it in that case? I've been using the CLI to do this (with rbspy under the hood)

@nate-at-gusto
Copy link

Add Singed.start to boot.rb, bin/rails runner 'Singed.stop'

@technicalpickles
Copy link
Collaborator Author

I can see the value in this now. I have been using memory_profiler recently, and have used things like at_exit hooks to stop and generate the report. I could see doing the same with singed.

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

No branches or pull requests

2 participants