peek/peek-gc — pull request #4 by jasonrclark (2014-06-17 17:24:52+00:00)
Title: Respect existing GC::Profiler.enabled? state

Currently peek-gc will enable and disable GC::Profiler before every request.
This has unfortunate side-effects if anyone else has set
`GC::Profiler.enable` and assumes the setting won't be changed under them.

newrelic_rpm was making this assumption (which we're fixing in the upcoming
release), but I thought others might benefit from being a little more cautious
here.

Note that there's still an issue here related to different conflicting code
calling `GC::Profiler.clear`, but I don't have a good solution to that. At the
very least preserving the existing setting on this seemed less likely to cause
suprises.