Class: Puppet::Util::Profiler::ObjectCounts
- Inherits:
-
Logging
show all
- Defined in:
- lib/puppet/util/profiler/object_counts.rb
Instance Method Summary
collapse
Methods inherited from Logging
#initialize, #shutdown
Instance Method Details
#finish(before) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/puppet/util/profiler/object_counts.rb', line 10
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
|
6
7
8
|
# File 'lib/puppet/util/profiler/object_counts.rb', line 6
def start
ObjectSpace.count_objects
end
|