Class: Rack::Insight::RedisPanel::Stats::Query
- Inherits:
-
Object
- Object
- Rack::Insight::RedisPanel::Stats::Query
- Includes:
- FilteredBacktrace
- Defined in:
- lib/rack/insight/panels/redis_panel/stats.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #display_time ⇒ Object
-
#initialize(time, command_args, method_call) ⇒ Query
constructor
A new instance of Query.
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
#command ⇒ Object (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 |
#time ⇒ Object (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_time ⇒ Object
17 18 19 |
# File 'lib/rack/insight/panels/redis_panel/stats.rb', line 17 def display_time "%.2fms" % time end |