Sha256: 6e618a7ee9a233576e1fa9969bbec39fe1805decc66867b569efcb1c24ad587f

Contents?: true

Size: 395 Bytes

Versions: 30

Compression:

Stored size: 395 Bytes

Contents

require 'json'

module Prometheus
  module Client
    class SimpleValue
      def initialize(_type, _metric_name, _name, _labels, *_args)
        @value = 0.0
      end

      def set(value)
        @value = value
      end

      def increment(by = 1)
        @value += by
      end

      def get
        @value
      end

      def self.multiprocess
        false
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
prometheus-client-mmap-0.12.0 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.11.0 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.10.0 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.10 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.9 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.8 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.7 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.6 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.5 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.4 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.3 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.2 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.1 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.1.pre.rc.2 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.1.pre.rc.1 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.0.pre.rc.1 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.9.0 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta45.10 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta45.9 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta45.8 lib/prometheus/client/simple_value.rb