Sha256: 7b08c10d905d0bd7e3a274966c228c604c2facfad6a646177039f5746d1be4bb

Contents?: true

Size: 407 Bytes

Versions: 22

Compression:

Stored size: 407 Bytes

Contents

module Stackify::Metrics
  class MetricsQueue < SizedQueue
    include MonitorMixin

    def initialize
      super(Stackify.configuration.queue_max_size)
    end

    alias :old_push :push

    def add_metric metric
      self.synchronize do
        self.old_push metric
      end
    end

    alias :old_size :size

    def size
      self.synchronize do
        self.old_size
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
stackify-api-ruby-2.1.0 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-2.1.0.beta1 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-2.0.0 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.3.0.beta1 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.2.10 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.2.9 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.2.7 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.2.4 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.2.3 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.1.0 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.15 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.14 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.13 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.12 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.11 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.10 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.9 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.8 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.7 lib/stackify/metrics/metrics_queue.rb
stackify-api-ruby-1.0.6 lib/stackify/metrics/metrics_queue.rb