Class: Barnes::Instruments::ObjectSpaceCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/barnes/instruments/object_space_counter.rb

Instance Method Summary collapse

Instance Method Details

#instrument!(state, counters, gauges) ⇒ Object



27
28
29
30
31
# File 'lib/barnes/instruments/object_space_counter.rb', line 27

def instrument!(state, counters, gauges)
  ObjectSpace.count_objects.each do |type, count|
    gauges[:"Objects.#{type}"] = count
  end
end