Sha256: 29e6ed5b3ddc50f5200364f9db672c828dc167aa251d75961085e17b5681ca70
Contents?: true
Size: 664 Bytes
Versions: 1
Compression:
Stored size: 664 Bytes
Contents
require 'archimedes/config' require 'archimedes/version' require 'statsd' class Archimedes attr_reader :service def initialize(config) @config = config @service = Statsd.new(@config.host, @config.port) @service.namespace = @config.namespace end def increment(metric, rate = 1) count(metric, 1, rate) end def decrement(metric, rate = 1) count(metric, -1, rate) end def count(metric, delta, rate = 1) service.count(metric, delta, rate) end def gauge(metric, value, rate = 1) service.gauge(metric, value, rate) end def time(metric, rate = 1) service.time(metric, rate) do yield end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
archimedes-0.0.1 | lib/archimedes.rb |