Method: Memory::Sampler#run
- Defined in:
- lib/memory/sampler.rb
#run(&block) ⇒ Object
Collects object allocation and memory of ruby code inside of passed block.
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/memory/sampler.rb', line 133 def run(&block) start begin # We do this to avoid retaining the result of the block. yield && false ensure stop end end |