Sha256: 423187037e45a0b332c6dd29946c83d7fda88110f4130273a2c3eed6b3347c32

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 Bytes

Contents

# frozen_string_literal: true

module Engines
  module Debug
    class Extractor
      METRICS = %i[
        debug_random
      ].freeze

      def call(provider)
        metrics = METRICS.map do |metric|
          [metric, send(metric) || 0]
        end.to_h

        provider.emit(metrics)
      end

      def requirements?
        true
      end

      private

      def debug_random
        rand(0..100)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
codemonitor-0.6.4 engines/debug/extractor.rb
codemonitor-0.6.3 engines/debug/extractor.rb
codemonitor-0.6.2 engines/debug/extractor.rb
codemonitor-0.6.1 engines/debug/extractor.rb
codemonitor-0.6.0 engines/debug/extractor.rb
codemonitor-0.5.0 engines/debug/extractor.rb
codemonitor-0.4.0 engines/debug/extractor.rb