Class: InstrumentAllTheThings::Testing::StatTracker

Inherits:
Clients::StatReporter::DataDog show all
Defined in:
lib/instrument_all_the_things/testing/stat_tracker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kwargs, &blk) ⇒ StatTracker

Returns a new instance of StatTracker.



30
31
32
33
# File 'lib/instrument_all_the_things/testing/stat_tracker.rb', line 30

def initialize(*args, **kwargs, &blk)
  super
  reset!
end

Instance Attribute Details

#emitted_valuesObject (readonly)

Returns the value of attribute emitted_values.



8
9
10
# File 'lib/instrument_all_the_things/testing/stat_tracker.rb', line 8

def emitted_values
  @emitted_values
end

Instance Method Details

#reset!Object



35
36
37
38
39
40
41
# File 'lib/instrument_all_the_things/testing/stat_tracker.rb', line 35

def reset!
  @emitted_values = Hash.new do |h, k|
    h[k] = Hash.new do |h2, k2|
      h2[k2] = []
    end
  end
end