class Hoss::Event
@api private
Constants
- DEFAULT_TYPE
Attributes
error[RW]
rubocop:enable Metrics/ParameterLists
filtered[RW]
rubocop:enable Metrics/ParameterLists
request[RW]
rubocop:enable Metrics/ParameterLists
response[RW]
rubocop:enable Metrics/ParameterLists
retries[RW]
rubocop:enable Metrics/ParameterLists
Public Class Methods
new()
click to toggle source
rubocop:disable Metrics/ParameterLists
# File lib/hoss/event.rb, line 72 def initialize @id = SecureRandom.uuid @request = Request.new # @response = Response.new @filtered = false @retries = 0 end
Public Instance Methods
done(clock_end: Util.monotonic_micros)
click to toggle source
# File lib/hoss/event.rb, line 107 def done(clock_end: Util.monotonic_micros) stop clock_end self end
inspect()
click to toggle source
relations
# File lib/hoss/event.rb, line 126 def inspect "<Hoss::Event id:#{id.inspect}" \ '>' end
running?()
click to toggle source
# File lib/hoss/event.rb, line 120 def running? started? && !stopped? end
start(clock_start = Util.monotonic_micros)
click to toggle source
life cycle
# File lib/hoss/event.rb, line 95 def start(clock_start = Util.monotonic_micros) @timestamp = Util.micros @clock_start = clock_start self end
started?()
click to toggle source
# File lib/hoss/event.rb, line 116 def started? !!timestamp end
stop(clock_end = Util.monotonic_micros)
click to toggle source
# File lib/hoss/event.rb, line 101 def stop(clock_end = Util.monotonic_micros) @duration ||= (clock_end - @clock_start) @self_time = @duration - child_durations.duration self end
stopped?()
click to toggle source
# File lib/hoss/event.rb, line 112 def stopped? !!duration end