Class: Rack::Insight::MongoPanel::Stats::Query
- Inherits:
-
Object
- Object
- Rack::Insight::MongoPanel::Stats::Query
- Defined in:
- lib/rack/insight/panels/mongo_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) ⇒ Query
constructor
A new instance of Query.
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
#command ⇒ Object (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 |
#time ⇒ Object (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_time ⇒ Object
14 15 16 |
# File 'lib/rack/insight/panels/mongo_panel/stats.rb', line 14 def display_time "%.2fms" % time end |