Class: Rack::Insight::MongoPanel::Stats::Query

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, command) ⇒ Query

Returns a new instance of Query.



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

def initialize(time, command)
  @time = time
  @command = command
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



7
8
9
# File 'lib/rack/insight/panels/mongo_panel/stats.rb', line 7

def command
  @command
end

#timeObject (readonly)

Returns the value of attribute time.



6
7
8
# File 'lib/rack/insight/panels/mongo_panel/stats.rb', line 6

def time
  @time
end

Instance Method Details

#display_timeObject



14
15
16
# File 'lib/rack/insight/panels/mongo_panel/stats.rb', line 14

def display_time
  "%.2fms" % time
end