Module: RailsObservatory::RedisClientInstrumentation
- Defined in:
- lib/rails_observatory/redis/redis_client_instrumentation.rb
Instance Method Summary collapse
Instance Method Details
#call(command, redis_config) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/rails_observatory/redis/redis_client_instrumentation.rb', line 3 def call(command, redis_config) payload_command = command payload_command = [payload_command.first] if payload_command.first == "SCRIPT" ActiveSupport::Notifications.instrument("call.redis", { command: payload_command.join(' ') }) do super end end |
#call_pipelined(commands, redis_config) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rails_observatory/redis/redis_client_instrumentation.rb', line 11 def call_pipelined(commands, redis_config) res = nil took = Benchmark.realtime { res = super } # puts "Redis call_pipelined took #{took * 1000} ms" res end |