yahoo/monitr — pull request #24 by evantorrie (2014-11-21 03:09:54+00:00)
Title: Performance fix - disable stack backtraces by default

Stack backtraces require installing a DebugEventListener into the
main running v8 isolate. Doing so also results in a significant
performance dropoff for any code which has frequent "events of
interest". This is because v8 does not allow us to limit the events
listened to just the DEBUGBREAK events, but instead will also
give us (Before|After)Compile events, ScriptCollected, NewFunction etc.

This commit changes the default to start with backtraces *not* enabled.
When they are enabled (via monitor.backtrace = true), the
DebugEventListener will be installed (resulting in reduced performance
from that point on). If monitor.backtrace is reset to false, then the
DebugEventListener will be reset to NULL, and the performance will
return to normal.

Also added an explicit isolate to NodeMonitor object

This is required for v0.11.14 and later versions of the v8
engine, since they now require an explicit Isolate object to be
passed to most v8 API routines. In our case, it's the
v8::Debug::DebugBreak() function.