Class: OpenCensus::Stats::AggregationData::Distribution
- Inherits:
-
Object
- Object
- OpenCensus::Stats::AggregationData::Distribution
- Defined in:
- lib/opencensus/stats/aggregation_data/distribution.rb
Overview
Distribution
This AggregationData contains a histogram of the collected values
Instance Attribute Summary collapse
-
#bucket_counts ⇒ Array<Integer>
readonly
Count of number of recorded values in buckets.
-
#buckets ⇒ Array<Integer>, Array<Float>
readonly
Buckets boundries.
-
#count ⇒ Integer
readonly
Count of recorded values.
-
#exemplars ⇒ Array<Exemplar>
readonly
Exemplars are points associated with each bucket in the distribution giving an example of what was aggregated into the bucket.
-
#max ⇒ Integer, Float
readonly
Maximum recorded value.
-
#mean ⇒ Integer, Float
readonly
Mean of recorded values.
-
#min ⇒ Integer, Float
readonly
Minimum recorded value.
-
#start_time ⇒ Time
readonly
Time of first recorded value.
-
#sum ⇒ Integer, Float
readonly
Sum of recorded values.
-
#sum_of_squared_deviation ⇒ Integer, Float
readonly
Sum of squared deviation of recorded values.
-
#time ⇒ Time
readonly
The latest time a new value was recorded.
Instance Method Summary collapse
-
#value ⇒ Hash
Get distribution result values.
Instance Attribute Details
#bucket_counts ⇒ Array<Integer> (readonly)
Returns Count of number of recorded values in buckets.
33 34 35 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 33 def bucket_counts @bucket_counts end |
#buckets ⇒ Array<Integer>, Array<Float> (readonly)
Returns Buckets boundries.
12 13 14 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 12 def buckets @buckets end |
#count ⇒ Integer (readonly)
Returns Count of recorded values.
15 16 17 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 15 def count @count end |
#exemplars ⇒ Array<Exemplar> (readonly)
Returns Exemplars are points associated with each bucket in the distribution giving an example of what was aggregated into the bucket.
44 45 46 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 44 def exemplars @exemplars end |
#max ⇒ Integer, Float (readonly)
Returns Maximum recorded value.
21 22 23 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 21 def max @max end |
#mean ⇒ Integer, Float (readonly)
Returns Mean of recorded values.
27 28 29 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 27 def mean @mean end |
#min ⇒ Integer, Float (readonly)
Returns Minimum recorded value.
24 25 26 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 24 def min @min end |
#start_time ⇒ Time (readonly)
Returns Time of first recorded value.
36 37 38 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 36 def start_time @start_time end |
#sum ⇒ Integer, Float (readonly)
Returns Sum of recorded values.
18 19 20 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 18 def sum @sum end |
#sum_of_squared_deviation ⇒ Integer, Float (readonly)
Returns Sum of squared deviation of recorded values.
30 31 32 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 30 def sum_of_squared_deviation @sum_of_squared_deviation end |
#time ⇒ Time (readonly)
Returns The latest time a new value was recorded.
39 40 41 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 39 def time @time end |
Instance Method Details
#value ⇒ Hash
Get distribution result values.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 94 def value { start_time: @start_time, count: @count, sum: @sum, max: @max, min: @min, sum_of_squared_deviation: @sum_of_squared_deviation, buckets: @buckets, bucket_counts: @bucket_counts } end |