class Hallmonitor::GaugeEvent
A Gauge event is an event that has a specific value, think of it like a tachometer or gas gauge on a car: at any given point it reports the current value of a variable.
Public Class Methods
new(name, value: nil, tags: {})
click to toggle source
@param name [String] Name of this guage @param value [Number] The current value of this guage
Calls superclass method
Hallmonitor::Event::new
# File lib/hallmonitor/gauge_event.rb, line 9 def initialize(name, value: nil, tags: {}) super(name, count: value, tags: tags) end
Public Instance Methods
to_json(*a)
click to toggle source
# File lib/hallmonitor/gauge_event.rb, line 24 def to_json(*a) { name: name, time: time, value: count, tags: tags }.to_json(*a) end
value()
click to toggle source
The value of this guage
# File lib/hallmonitor/gauge_event.rb, line 14 def value count end
value=(new_value)
click to toggle source
Sets the value of this guage @param new_value [Number]
# File lib/hallmonitor/gauge_event.rb, line 20 def value=(new_value) self.count = new_value end