Sha256: 7e28ccc1f224c88dfe93b03e58ced261818a47e2cda5bab525f1461efe15a91c

Contents?: true

Size: 356 Bytes

Versions: 20

Compression:

Stored size: 356 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Telemetry
  class Registry
    def initialize
      @counters = {}
      @summaries = {}
    end

    def counter(name)
      @counters.fetch(name) { @counters[name] = LabelledCounter.new }
    end

    def summary(name)
      @summaries.fetch(name) { @summaries[name] = LabelledSummary.new }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nanoc-4.8.14 lib/nanoc/telemetry/registry.rb
nanoc-4.8.13 lib/nanoc/telemetry/registry.rb
nanoc-4.8.12 lib/nanoc/telemetry/registry.rb
nanoc-4.8.11 lib/nanoc/telemetry/registry.rb
nanoc-4.8.10 lib/nanoc/telemetry/registry.rb
nanoc-4.8.9 lib/nanoc/telemetry/registry.rb
nanoc-4.8.8 lib/nanoc/telemetry/registry.rb
nanoc-4.8.7 lib/nanoc/telemetry/registry.rb
nanoc-4.8.6 lib/nanoc/telemetry/registry.rb
nanoc-4.8.5 lib/nanoc/telemetry/registry.rb
nanoc-4.8.4 lib/nanoc/telemetry/registry.rb
nanoc-4.8.3 lib/nanoc/telemetry/registry.rb
nanoc-4.8.2 lib/nanoc/telemetry/registry.rb
nanoc-4.8.1 lib/nanoc/telemetry/registry.rb
nanoc-4.8.0 lib/nanoc/telemetry/registry.rb
nanoc-4.7.14 lib/nanoc/telemetry/registry.rb
nanoc-4.7.13 lib/nanoc/telemetry/registry.rb
nanoc-4.7.12 lib/nanoc/telemetry/registry.rb
nanoc-4.7.11 lib/nanoc/telemetry/registry.rb
nanoc-4.7.10 lib/nanoc/telemetry/registry.rb