Sha256: 906dcae43769d64f1a1a2927774579d2b3ead12823f15b420c1bf9bf0012a372

Contents?: true

Size: 501 Bytes

Versions: 14

Compression:

Stored size: 501 Bytes

Contents

module Vitals::Reporters
  class InmemReporter < BaseReporter
    attr_accessor :reports
    attr_accessor :format

    def initialize
      flush
    end

    def flush
      @reports = []
    end

    def inc(m)
      @reports << { :inc => n( m ) }
    end

    def gauge(m, v)
      @reports << { :gauge => n( m ), :val => v }
    end

    def timing(m, v)
      @reports << { :timing => n( m ), :val => v }
    end

  private
    def n(m)
      Vitals::Utils.normalize_metric(m)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vitals-0.12.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.11.1 lib/vitals/reporters/inmem_reporter.rb
vitals-0.11.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.10.1 lib/vitals/reporters/inmem_reporter.rb
vitals-0.10.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.9.1 lib/vitals/reporters/inmem_reporter.rb
vitals-0.9.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.8.1 lib/vitals/reporters/inmem_reporter.rb
vitals-0.8.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.7.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.6.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.5.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.4.0 lib/vitals/reporters/inmem_reporter.rb
vitals-0.3.0 lib/vitals/reporters/inmem_reporter.rb