Class: OpenCensus::Stats::AggregationData::Distribution

Inherits:
Object
  • Object
show all
Defined in:
lib/opencensus/stats/aggregation_data/distribution.rb

Overview

Distribution

This AggregationData contains a histogram of the collected values

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bucket_countsArray<Integer> (readonly)

Returns Count of number of recorded values in buckets.

Returns:

  • (Array<Integer>)

    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

#bucketsArray<Integer>, Array<Float> (readonly)

Returns Buckets boundries.

Returns:

  • (Array<Integer>, Array<Float>)

    Buckets boundries



12
13
14
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 12

def buckets
  @buckets
end

#countInteger (readonly)

Returns Count of recorded values.

Returns:

  • (Integer)

    Count of recorded values



15
16
17
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 15

def count
  @count
end

#exemplarsArray<Exemplar> (readonly)

Returns Exemplars are points associated with each bucket in the distribution giving an example of what was aggregated into the bucket.

Returns:

  • (Array<Exemplar>)

    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

#maxInteger, Float (readonly)

Returns Maximum recorded value.

Returns:

  • (Integer, Float)

    Maximum recorded value



21
22
23
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 21

def max
  @max
end

#meanInteger, Float (readonly)

Returns Mean of recorded values.

Returns:

  • (Integer, Float)

    Mean of recorded values



27
28
29
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 27

def mean
  @mean
end

#minInteger, Float (readonly)

Returns Minimum recorded value.

Returns:

  • (Integer, Float)

    Minimum recorded value



24
25
26
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 24

def min
  @min
end

#start_timeTime (readonly)

Returns Time of first recorded value.

Returns:

  • (Time)

    Time of first recorded value



36
37
38
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 36

def start_time
  @start_time
end

#sumInteger, Float (readonly)

Returns Sum of recorded values.

Returns:

  • (Integer, Float)

    Sum of recorded values



18
19
20
# File 'lib/opencensus/stats/aggregation_data/distribution.rb', line 18

def sum
  @sum
end

#sum_of_squared_deviationInteger, Float (readonly)

Returns Sum of squared deviation of recorded values.

Returns:

  • (Integer, Float)

    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

#timeTime (readonly)

Returns The latest time a new value was recorded.

Returns:

  • (Time)

    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

#valueHash

Get distribution result values.

Returns:

  • (Hash)


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