Class: Prometheus::Client::Summary::Value
- Inherits:
-
Hash
- Object
- Hash
- Prometheus::Client::Summary::Value
- Defined in:
- lib/prometheus/client/summary.rb
Overview
Value represents the state of a Summary at a given point.
Instance Attribute Summary collapse
-
#sum ⇒ Object
Returns the value of attribute sum.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(estimator) ⇒ Value
constructor
A new instance of Value.
Constructor Details
#initialize(estimator) ⇒ Value
Returns a new instance of Value.
15 16 17 18 19 20 21 22 |
# File 'lib/prometheus/client/summary.rb', line 15 def initialize(estimator) @sum = estimator.sum @total = estimator.observations estimator.invariants.each do |invariant| self[invariant.quantile] = estimator.query(invariant.quantile) end end |
Instance Attribute Details
#sum ⇒ Object
Returns the value of attribute sum.
13 14 15 |
# File 'lib/prometheus/client/summary.rb', line 13 def sum @sum end |
#total ⇒ Object
Returns the value of attribute total.
13 14 15 |
# File 'lib/prometheus/client/summary.rb', line 13 def total @total end |