Class: Rack::Insight::RedisPanel::Stats::Query

Inherits:
Object
  • Object
show all
Includes:
FilteredBacktrace
Defined in:
lib/rack/insight/panels/redis_panel/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from FilteredBacktrace

#backtrace, backtrace_regexp, #filtered_backtrace, #has_backtrace?, root_for_backtrace_filtering

Constructor Details

#initialize(time, command_args, method_call) ⇒ Query

Returns a new instance of Query.



11
12
13
14
15
# File 'lib/rack/insight/panels/redis_panel/stats.rb', line 11

def initialize(time, command_args, method_call)
  @time = time
  @command = command_args.inspect
  @backtrace = method_call.backtrace
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



9
10
11
# File 'lib/rack/insight/panels/redis_panel/stats.rb', line 9

def command
  @command
end

#timeObject (readonly)

Returns the value of attribute time.



8
9
10
# File 'lib/rack/insight/panels/redis_panel/stats.rb', line 8

def time
  @time
end

Instance Method Details

#display_timeObject



17
18
19
# File 'lib/rack/insight/panels/redis_panel/stats.rb', line 17

def display_time
  "%.2fms" % time
end