Open subvertallchris opened 9 years ago
Hi @subvertallchris , we can create a new Spy that plugs into Sinatra during the next few days
Alternatively, if there's a really urgent need, there's a few example spies in https://github.com/bear-metal/tunemygc/tree/master/lib/tunemygc/spies (minitest and active_job are good base examples for this use case I think). What's most important is hooks for:
I documented these important lifecycle events in https://github.com/bear-metal/tunemygc/blob/master/doc/protocol.md#tunemygc-protocol . The above 3 needs to be covered, the GC specific ones are covered by tracepoints.
Perfect, thank you! This is a really cool gem, thank you for making this available.
I threw together a spy for RSpec but receive this upon completion:
Ruby version 2.2.0 or Rails version 0.0 not supported. Failed to sync 211 snapshots
It works if I tell it I'm running Rails 4.1.7, though I guess those results might not be optimal. ;-)
Happy to send a PR with this once it's working, if you'd like.
Send! :-)
Will do once I'm home. It's pretty crude, really just the minitest class with the hooks swapped out. Is there a change I need to make to fix that Rails version error?
On Saturday, February 28, 2015, Lourens Naudé notifications@github.com wrote:
Send! :-)
— Reply to this email directly or view it on GitHub https://github.com/bear-metal/tunemygc/issues/2#issuecomment-76551997.
I can take a stab at it
I'm a little short on time and haven't worked with minitest much, so please excuse my lack of tests.
It might be nice if there was a BaseSpy
class, since there's so much shared behavior. The unique qualities of each subclass could be defined in methods or constants within the subclasses, then users could override or add behavior as needed. The instance variables @tests_processed
and @tests_limit
could be generalized. It'd make it very easy to add new spies.
I'm trying to tune GC for a Sinatra/Padrino app, so it looks like I need to setup the manual agent. Do you have any recommendations for this?