Class: Peek::Views::Flexirest
- Inherits:
-
View
- Object
- View
- Peek::Views::Flexirest
- Defined in:
- lib/peek/views/flexirest.rb
Instance Method Summary collapse
- #formatted_duration ⇒ Object
-
#initialize(options = {}) ⇒ Flexirest
constructor
A new instance of Flexirest.
- #results ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Flexirest
Returns a new instance of Flexirest.
6 7 8 |
# File 'lib/peek/views/flexirest.rb', line 6 def initialize( = {}) # Nothing needing doing... end |
Instance Method Details
#formatted_duration ⇒ Object
10 11 12 13 |
# File 'lib/peek/views/flexirest.rb', line 10 def formatted_duration ms = ::Flexirest::Instrumentation.time_spent "%.0fms" % ms end |
#results ⇒ Object
15 16 17 18 19 20 |
# File 'lib/peek/views/flexirest.rb', line 15 def results { :duration => formatted_duration, :calls => ::Flexirest::Instrumentation.calls_made, } end |