Class: Rack::Bug::MongoPanel::Stats::Query
- Inherits:
-
Object
- Object
- Rack::Bug::MongoPanel::Stats::Query
- Defined in:
- lib/rack/bug/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.
10 11 12 13 |
# File 'lib/rack/bug/panels/mongo_panel/stats.rb', line 10 def initialize(time, command) @time = time @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
8 9 10 |
# File 'lib/rack/bug/panels/mongo_panel/stats.rb', line 8 def command @command end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
7 8 9 |
# File 'lib/rack/bug/panels/mongo_panel/stats.rb', line 7 def time @time end |
Instance Method Details
#display_time ⇒ Object
15 16 17 |
# File 'lib/rack/bug/panels/mongo_panel/stats.rb', line 15 def display_time "%.2fms" % time end |