Sha256: f3f6864533bdf68f2b4086644187a8b2f67ed01ffafbb617912492dab3a7ad94

Contents?: true

Size: 571 Bytes

Versions: 62

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  module Telemetry
    class MemoryInitConsumer
      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

62 entries across 62 versions & 1 rubygems

Version Path
splitclient-rb-8.5.0-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.5.0 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.5.0.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.5.0.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.1.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.1.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0.rc.1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.4.0.rc.1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.2.pre.rc2-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.2.pre.rc2 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.2.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.2.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.1.pre.rc1-java lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb
splitclient-rb-8.3.1.pre.rc1 lib/splitclient-rb/telemetry/memory/memory_init_consumer.rb