Class: Rack::Bug::RedisPanel::Stats::Query

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject (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

#timeObject (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_timeObject



18
19
20
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 18

def display_time
  "%.2fms" % time
end