class Puppet::Util::Profiler::ObjectCounts

Public Instance Methods

finish(before) click to toggle source
# File lib/puppet/util/profiler/object_counts.rb, line 8
def finish(before)
  after = ObjectSpace.count_objects

  diff = before.collect do |type, count|
    [type, after[type] - count]
  end

  diff.sort.collect { |pair| pair.join(': ') }.join(', ')
end
start() click to toggle source
# File lib/puppet/util/profiler/object_counts.rb, line 4
def start
  ObjectSpace.count_objects
end