class Benchmark::Memory::HeldResults::MetricSerializer
Serialize metrics for holding between runs.
def load(hash)
-
(Measurement::Metric)-
Parameters:
-
hash(Hash) -- A JSON document hash.
def load(hash) @object = Measurement::Metric.new( hash['type'], hash['allocated'], hash['retained'] ) self end
def to_h
-
(Hash)- The metric as a Hash.
def to_h { allocated: object.allocated, retained: object.retained, type: object.type } end