Sha256: 08e0273ba244c5e936de9502239ff86705788d048bf03a41bdf323c0fbc64da0

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

# frozen_string_literal: true

module Mnemosyne
  module Probes
    module RedisClient
      module Command
        class Probe < ::Mnemosyne::Probe
          def setup
            ::RedisClient.register Instrumentation
          end

          module Instrumentation
            def call(command, redis_config)
              ::Mnemosyne::Support::Redis.instrument([command], redis_config.server_url) { super }
            end

            def call_pipelined(commands, redis_config)
              ::Mnemosyne::Support::Redis.instrument(commands, redis_config.server_url) { super }
            end
          end
        end
      end
    end

    register 'RedisClient',
      'redis_client',
      RedisClient::Command::Probe.new
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mnemosyne-ruby-2.0.0 lib/mnemosyne/probes/redis-client/command.rb
mnemosyne-ruby-1.17.0 lib/mnemosyne/probes/redis-client/command.rb
mnemosyne-ruby-1.16.0 lib/mnemosyne/probes/redis-client/command.rb