Sha256: 475e330b61f51f5c89d6f4fbfac9b58c32a5230e19901042a6213412b5a09489

Contents?: true

Size: 407 Bytes

Versions: 9

Compression:

Stored size: 407 Bytes

Contents

# encoding: UTF-8

require 'prometheus/client/metric'

module Prometheus
  module Client
    # A Gauge is a metric that exposes merely an instantaneous value or some
    # snapshot thereof.
    class Gauge < Metric
      def type
        :gauge
      end

      # Sets the value for the given label set
      def set(labels, value)
        @values[label_set_for(labels)] = value
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
prometheus-client-0.6.0 lib/prometheus/client/gauge.rb
prometheus-client-0.5.0 lib/prometheus/client/gauge.rb
custom-prometheus-client-0.4.3 lib/prometheus/client/gauge.rb
prometheus-client-0.4.2 lib/prometheus/client/gauge.rb
prometheus-client-0.4.1 lib/prometheus/client/gauge.rb
prometheus-client-0.4.0 lib/prometheus/client/gauge.rb
prometheus-client-0.3.1 lib/prometheus/client/gauge.rb
prometheus-client-0.3.0 lib/prometheus/client/gauge.rb
prometheus-client-0.3.0.pre.rc.1 lib/prometheus/client/gauge.rb