Module: Memtf
- Defined in:
- lib/memtf.rb,
lib/memtf/version.rb
Overview
A simple utility to help isolate memory leaks. Two memory snapshots are compared to determine which classes, if any, are leaking.
Defined Under Namespace
Modules: Utilities Classes: Analyzer, Persistance, Reporter, Runner
Constant Summary collapse
- START =
Represents the starting memory snapshot
:start
- STOP =
Represents the ending memory snapshot
:stop
- VERSION =
nodoc
"0.0.3"
Class Attribute Summary collapse
-
.runner ⇒ Object
Returns the value of attribute runner.
Class Method Summary collapse
-
.around(options = {}, &block) ⇒ Object
Generate an initial memory snapshot, execute the block, then generate the final memory snapshot.
-
.start(options = {}) ⇒ Runner
Generate an initial memory snapshot.
-
.stop(options = {}) ⇒ Object
Generate a final memory snapshot.
Class Attribute Details
.runner ⇒ Object
Returns the value of attribute runner.
11 12 13 |
# File 'lib/memtf.rb', line 11 def runner @runner end |
Class Method Details
.around(options = {}, &block) ⇒ Object
Generate an initial memory snapshot, execute the block, then generate the final memory snapshot.
35 36 37 38 39 |
# File 'lib/memtf.rb', line 35 def around(={}, &block) start() block.call if block_given? stop() end |