Memory SourceMemoryReport

class Report

Definitions

def add(sampler)

Add all samples from the given sampler to this report.

Implementation

def add(sampler)
	self.concat(sampler.allocated)
end

def concat(allocations)

Add allocations to this report.

Implementation

def concat(allocations)
	allocations.each do |allocation|
		@total_allocated << allocation
		
		if allocation.retained
			@total_retained << allocation
		end
		
		if !@retained_only || allocation.retained
			@aggregates.each do |aggregate|
				aggregate << allocation
			end
		end
	end
end