class Benchmark::Memory::MetricExtractor
Extracts metrics from a memory profiler result
def self.extract_memory(result)
-
(Benchmark::Memory::Measurement::Metric)-
Parameters:
-
result(MemoryProfiler::Results) --
def self.extract_memory(result) Measurement::Metric.new( :memsize, result.total_allocated_memsize, result.total_retained_memsize ) end
def self.extract_objects(result)
-
(Benchmark::Memory::Measurement::Metric)-
Parameters:
-
result(MemoryProfiler::Results) --
def self.extract_objects(result) Measurement::Metric.new( :objects, result.total_allocated, result.total_retained ) end
def self.extract_strings(result)
-
(Benchmark::Memory::Measurement::Metric)-
Parameters:
-
result(MemoryProfiler::Results) --
def self.extract_strings(result) Measurement::Metric.new( :strings, result.strings_allocated.size, result.strings_retained.size ) end