class Cabin::Metrics::Meter
Public Class Methods
Public Instance Methods
Source
# File lib/cabin/metrics/meter.rb, line 19 def mark @lock.synchronize do @value += 1 # TODO(sissel): Keep some moving averages? end emit end
Mark an event
Source
# File lib/cabin/metrics/meter.rb, line 34 def to_hash return @lock.synchronize do { :value => @value } end end
Source
# File lib/cabin/metrics/meter.rb, line 29 def value return @lock.synchronize { @value } end
Get the value of this metric.