Sha256: ff0c54ff51db385c2444e82d74f8156ac2a0577d319e7a6ad10b2a8f7588597f

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

module Hallmonitor
  # 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.
  class GaugeEvent < Event
    # @param name [String] Name of this guage
    # @param value [Number] The current value of this guage
    def initialize(name, value: nil, tags: {})
      super(name, count: value, tags: tags)
    end

    # The value of this guage
    def value
      count
    end

    # Sets the value of this guage
    # @param new_value [Number]
    def value=(new_value)
      self.count = new_value
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hallmonitor-4.2.0 lib/hallmonitor/gauge_event.rb