Class: OpenCensus::Stats::AggregationData::Count
- Inherits:
-
Object
- Object
- OpenCensus::Stats::AggregationData::Count
- Defined in:
- lib/opencensus/stats/aggregation_data/count.rb
Overview
Count
Counts number of measurements recorded.
Instance Attribute Summary collapse
-
#time ⇒ Time
readonly
The latest timestamp a new data point was recorded.
-
#value ⇒ Integer, Float
readonly
Current count value.
Instance Method Summary collapse
-
#add(value, time, attachments: nil) ⇒ Object
Increment counter.
Instance Attribute Details
#time ⇒ Time (readonly)
Returns The latest timestamp a new data point was recorded.
15 16 17 |
# File 'lib/opencensus/stats/aggregation_data/count.rb', line 15 def time @time end |
#value ⇒ Integer, Float (readonly)
Returns Current count value.
12 13 14 |
# File 'lib/opencensus/stats/aggregation_data/count.rb', line 12 def value @value end |
Instance Method Details
#add(value, time, attachments: nil) ⇒ Object
Increment counter.
28 29 30 31 |
# File 'lib/opencensus/stats/aggregation_data/count.rb', line 28 def add value, time, attachments: nil @time = time @value += 1 end |