Sha256: 9ea97a0f95ba978a93c3787cbf0e0ac88a5c2a597b1ea59897b19b61a3898017
Contents?: true
Size: 1 KB
Versions: 152
Compression:
Stored size: 1 KB
Contents
module CC module Analyzer class StatsdContainerListener < ContainerListener def initialize(engine_name, statsd) @engine_name = engine_name @statsd = statsd end def started(_data) increment("started") end def timed_out(data) timing("time", data.duration) increment("result.error") increment("result.error.timeout") end def finished(data) timing("time", data.duration) increment("finished") if data.status.success? increment("result.success") else increment("result.error") end end private attr_reader :engine_name, :statsd def increment(metric) statsd.increment("engines.#{metric}") statsd.increment("engines.names.#{engine_name}.#{metric}") end def timing(metric, ms) statsd.timing("engines.#{metric}", ms) statsd.timing("engines.names.#{engine_name}.#{metric}", ms) end end end end
Version data entries
152 entries across 152 versions & 1 rubygems