Class: GraphQL::Tracing::StatsdTrace::StatsdMonitor::Event

Inherits:
MonitorTrace::Monitor::Event show all
Defined in:
lib/graphql/tracing/statsd_trace.rb

Instance Attribute Summary

Attributes inherited from MonitorTrace::Monitor::Event

#keyword, #object

Instance Method Summary collapse

Methods inherited from MonitorTrace::Monitor::Event

#initialize

Constructor Details

This class inherits a constructor from GraphQL::Tracing::MonitorTrace::Monitor::Event

Instance Method Details

#finishObject



40
41
42
43
# File 'lib/graphql/tracing/statsd_trace.rb', line 40

def finish
  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @start_time
  @monitor.statsd.timing(@monitor.name_for(keyword, object), elapsed)
end

#startObject



36
37
38
# File 'lib/graphql/tracing/statsd_trace.rb', line 36

def start
  @start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
end