singed
singed copied to clipboard
Add `start` and `stop` methods for when code isn't conveniently block wrappable
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
This would help profiling Rails boot too
@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)
Add Singed.start
to boot.rb
, bin/rails runner 'Singed.stop'
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.