Sha256: cd5cb24f3d122472c80b0357e8502120331660ae8be4d2cc7a10244831984ae5
Contents?: true
Size: 667 Bytes
Versions: 10
Compression:
Stored size: 667 Bytes
Contents
module Nanoc::Telemetry class LabelledSummary def initialize @summaries = {} end def observe(value, label) get(label).observe(value) end def get(label) @summaries.fetch(label) { @summaries[label] = Summary.new } end def empty? @summaries.empty? end def quantile(fraction, label) get(label).quantile(fraction) end def map @summaries.map { |(label, summary)| yield(label, summary) } end # TODO: add quantiles(fraction) # TODO: add min(label) # TODO: add mins # TODO: add max(label) # TODO: add maxs # TODO: add sum(label) # TODO: add sums end end
Version data entries
10 entries across 10 versions & 1 rubygems