class ProductionBreakpoints::Breakpoints::Latency
Exposes nanosecond the latency of executing the selected lines
Constants
- TRACEPOINT_TYPES
Public Instance Methods
handle(caller_binding, &block)
click to toggle source
Calls superclass method
ProductionBreakpoints::Breakpoints::Base#handle
# File lib/ruby-production-breakpoints/breakpoints/latency.rb, line 9 def handle(caller_binding, &block) return super(caller_binding, &block) unless @tracepoint.enabled? start_time = StaticTracing.nsec val = super(caller_binding, &block) duration = StaticTracing.nsec - start_time @tracepoint.fire(duration) resume(caller_binding, &block) || val end