Module: Perfgate::Instrumentation::Allocations
- Defined in:
- lib/perfgate/instrumentation/allocations.rb
Overview
Ruby object allocation count during a Perfgate.measure block
(spec section 13.4), using the allocation counter built into every
supported Ruby version.
Class Method Summary collapse
Class Method Details
.finish(started_at) ⇒ Object
15 16 17 |
# File 'lib/perfgate/instrumentation/allocations.rb', line 15 def finish(started_at) { "allocations" => GC.stat(:total_allocated_objects) - started_at } end |
.start ⇒ Object
11 12 13 |
# File 'lib/perfgate/instrumentation/allocations.rb', line 11 def start GC.stat(:total_allocated_objects) end |