Class: RSpecTelemetry::Analyzer::QueryStat
- Inherits:
-
Struct
- Object
- Struct
- RSpecTelemetry::Analyzer::QueryStat
- Defined in:
- lib/rspec_telemetry/analyzer.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#in_factory_ms ⇒ Object
Returns the value of attribute in_factory_ms.
-
#max_ms ⇒ Object
Returns the value of attribute max_ms.
-
#name ⇒ Object
Returns the value of attribute name.
-
#total_ms ⇒ Object
Returns the value of attribute total_ms.
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
26 27 28 |
# File 'lib/rspec_telemetry/analyzer.rb', line 26 def count @count end |
#in_factory_ms ⇒ Object
Returns the value of attribute in_factory_ms
26 27 28 |
# File 'lib/rspec_telemetry/analyzer.rb', line 26 def in_factory_ms @in_factory_ms end |
#max_ms ⇒ Object
Returns the value of attribute max_ms
26 27 28 |
# File 'lib/rspec_telemetry/analyzer.rb', line 26 def max_ms @max_ms end |
#name ⇒ Object
Returns the value of attribute name
26 27 28 |
# File 'lib/rspec_telemetry/analyzer.rb', line 26 def name @name end |
#total_ms ⇒ Object
Returns the value of attribute total_ms
26 27 28 |
# File 'lib/rspec_telemetry/analyzer.rb', line 26 def total_ms @total_ms end |
Instance Method Details
#avg_ms ⇒ Object
27 28 29 |
# File 'lib/rspec_telemetry/analyzer.rb', line 27 def avg_ms count.to_i.zero? ? 0.0 : total_ms / count end |