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 23 |
# 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'))) @generation = nil if @generation == 0 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
25 26 27 |
# File 'lib/heap_profiler/diff.rb', line 25 def allocated_diff @allocated_diff ||= DumpSubset.new(@allocated.path, @generation) end |
#retained_diff ⇒ Object
29 30 31 |
# File 'lib/heap_profiler/diff.rb', line 29 def retained_diff @retained_diff ||= DumpSubset.new(open_dump('retained').path, @generation) end |