Class: HeapProfiler::Diff
- Inherits:
-
Object
- Object
- HeapProfiler::Diff
- Defined in:
- lib/heap_profiler/diff.rb
Defined Under Namespace
Classes: DumpSubset
Instance Attribute Summary collapse
-
#allocated ⇒ Object
readonly
Returns the value of attribute allocated.
Instance Method Summary collapse
- #allocated_diff ⇒ Object
-
#initialize(report_directory) ⇒ Diff
constructor
A new instance of Diff.
- #retained_diff ⇒ Object
Constructor Details
#initialize(report_directory) ⇒ Diff
Returns a new instance of Diff.
18 19 20 21 22 |
# File 'lib/heap_profiler/diff.rb', line 18 def initialize(report_directory) @report_directory = report_directory @allocated = open_dump('allocated') @generation = Integer(File.read(File.join(report_directory, 'generation.info'))) end |
Instance Attribute Details
#allocated ⇒ Object (readonly)
Returns the value of attribute allocated.
16 17 18 |
# File 'lib/heap_profiler/diff.rb', line 16 def allocated @allocated end |
Instance Method Details
#allocated_diff ⇒ Object
24 25 26 |
# File 'lib/heap_profiler/diff.rb', line 24 def allocated_diff @allocated_diff ||= DumpSubset.new(@allocated.path, @generation) end |
#retained_diff ⇒ Object
28 29 30 |
# File 'lib/heap_profiler/diff.rb', line 28 def retained_diff @retained_diff ||= DumpSubset.new(open_dump('retained').path, @generation) end |