Sha256: 0908d774476b51759123e0c15db2776ca114ea1335fa1bcbfa121756a1588cc4

Contents?: true

Size: 405 Bytes

Versions: 14

Compression:

Stored size: 405 Bytes

Contents

require 'json'
require 'mmap'

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

14 entries across 14 versions & 1 rubygems

Version Path
prometheus-client-mmap-0.7.0.beta33 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta32 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta31 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta30 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta29 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta28 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta27 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta26 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta25 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta24 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta23 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta22 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta21 lib/prometheus/client/simple_value.rb
prometheus-client-mmap-0.7.0.beta20 lib/prometheus/client/simple_value.rb