Sha256: 0027d55eab0272d5e0bac99d99b3dd6c66afcb9dcc246e5cd7d343eda758e59d

Contents?: true

Size: 586 Bytes

Versions: 80

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  module Telemetry
    class MemoryInitConsumer < InitConsumer
      DEFAULT_VALUE = 0

      def initialize(config)
        @config = config
        @adapter = config.telemetry_adapter
      end

      def non_ready_usages
        find_counts(Domain::Constants::NON_READY_USAGES)
      end

      def bur_timeouts
        find_counts(Domain::Constants::BUR_TIMEOUT)
      end

      private

      def find_counts(action)
        @adapter.factory_counters.find { |l| l[:action] == action }[:counts].value
      end
    end
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
splitclient-rb-8.0.0.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.0.0.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc5-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc5 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc4-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc4 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc3-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc3 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.5.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.4.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.3-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-7.3.3 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb