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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, *command_args) ⇒ Query

Returns a new instance of Query.



10
11
12
13
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 10

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

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



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

def command
  @command
end

#timeObject (readonly)

Returns the value of attribute time.



7
8
9
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 7

def time
  @time
end

Instance Method Details

#display_timeObject



15
16
17
# File 'lib/rack/bug/panels/redis_panel/stats.rb', line 15

def display_time
  "%.2fms" % time
end