Class: RSpecTelemetry::FactoryAggregation::Stat
- Inherits:
-
Struct
- Object
- Struct
- RSpecTelemetry::FactoryAggregation::Stat
- Defined in:
- lib/rspec_telemetry/factory_aggregation.rb
Overview
Shared by live summaries, CLI reports, and the viewer so ranking rules stay identical. A Struct (not Data) so collection runs on Ruby 3.1, where this is on the require path via summary.rb.
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#factory ⇒ Object
Returns the value of attribute factory.
-
#key ⇒ Object
Returns the value of attribute key.
-
#max_ms ⇒ Object
Returns the value of attribute max_ms.
-
#self_total_ms ⇒ Object
Returns the value of attribute self_total_ms.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
-
#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
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def count @count end |
#factory ⇒ Object
Returns the value of attribute factory
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def factory @factory end |
#key ⇒ Object
Returns the value of attribute key
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def key @key end |
#max_ms ⇒ Object
Returns the value of attribute max_ms
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def max_ms @max_ms end |
#self_total_ms ⇒ Object
Returns the value of attribute self_total_ms
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def self_total_ms @self_total_ms end |
#strategy ⇒ Object
Returns the value of attribute strategy
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def strategy @strategy end |
#total_ms ⇒ Object
Returns the value of attribute total_ms
8 9 10 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 8 def total_ms @total_ms end |
Instance Method Details
#avg_ms ⇒ Object
9 |
# File 'lib/rspec_telemetry/factory_aggregation.rb', line 9 def avg_ms = count.zero? ? 0.0 : total_ms / count |