Class: OpenCensus::Stats::AggregationData::LastValue
- Inherits:
-
Object
- Object
- OpenCensus::Stats::AggregationData::LastValue
- Defined in:
- lib/opencensus/stats/aggregation_data/last_value.rb
Overview
LastValue
Represents the last recorded value.
Instance Attribute Summary collapse
-
#time ⇒ Time
readonly
The latest time at new data point was recorded.
-
#value ⇒ Integer, Float
readonly
Last recorded value.
Instance Method Summary collapse
-
#add(value, time, attachments: nil) ⇒ Object
Set last value.
Instance Attribute Details
#time ⇒ Time (readonly)
Returns The latest time at new data point was recorded.
15 16 17 |
# File 'lib/opencensus/stats/aggregation_data/last_value.rb', line 15 def time @time end |
#value ⇒ Integer, Float (readonly)
Returns Last recorded value.
12 13 14 |
# File 'lib/opencensus/stats/aggregation_data/last_value.rb', line 12 def value @value end |
Instance Method Details
#add(value, time, attachments: nil) ⇒ Object
Set last value
23 24 25 26 |
# File 'lib/opencensus/stats/aggregation_data/last_value.rb', line 23 def add value, time, attachments: nil @time = time @value = value end |