class Object
Public Instance Methods
call_with_profiling(*args, &blk)
click to toggle source
# File lib/nightwing/extensions/redis.rb, line 2 def call_with_profiling(*args, &blk) begin start_time = Time.now result = call_without_profiling(*args, &blk) ensure time_ellasped = (Time.now - start_time) * 1_000 command = args.first.is_a?(Array) ? args[0][0] : args.first Nightwing.client.timing "redis.command.time", time_ellasped Nightwing.client.timing "redis.command.#{command}.time", time_ellasped Nightwing.client.increment "redis.command.processed" Nightwing.client.increment "redis.command.#{command}.processed" end result end
Also aliased as: call
perform_with_profiling(*args)
click to toggle source
# File lib/nightwing/extensions/dalli.rb, line 2 def perform_with_profiling(*args) begin start_time = Time.now result = perform_without_profiling(*args) ensure time_ellasped = (Time.now - start_time) * 1_000 command = args.first.is_a?(Array) ? args[0][0] : args.first Nightwing.client.timing "memcache.command.time", time_ellasped Nightwing.client.timing "memcache.command.#{command}.time", time_ellasped Nightwing.client.increment "memcache.command.processed" Nightwing.client.increment "memcache.command.#{command}.processed" end result end
Also aliased as: perform