Class: Rack::Bug::RedisPanel::Stats::Query
- Inherits:
-
Object
- Object
- Rack::Bug::RedisPanel::Stats::Query
- Includes:
- FilteredBacktrace
- Defined in:
- lib/rack/bug/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, backtrace) ⇒ Query
constructor
A new instance of Query.
Methods included from FilteredBacktrace
#backtrace, #filtered_backtrace, #has_backtrace?, #root_for_backtrace_filtering
Constructor Details
#initialize(time, command_args, backtrace) ⇒ Query
Returns a new instance of Query.
12 13 14 15 16 |
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 12 def initialize(time, command_args, backtrace) @time = time @command = command_args.inspect @backtrace = backtrace end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 10 def command @command end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
9 10 11 |
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 9 def time @time end |
Instance Method Details
#display_time ⇒ Object
18 19 20 |
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 18 def display_time "%.2fms" % time end |