Class: Google::Api::Distribution::BucketOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/logging/v2/doc/google/api/distribution.rb

Overview

A Distribution may optionally contain a histogram of the values in the population. The histogram is given in +bucket_counts+ as counts of values that fall into one of a sequence of non-overlapping buckets. The sequence of buckets is described by +bucket_options+.

A bucket specifies an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket is strictly greater than the lower bound.

The sequence of N buckets for a Distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.

+BucketOptions+ describes bucket boundaries in one of three ways. Two describe the boundaries by giving parameters for a formula to generate boundaries and one gives the bucket boundaries explicitly.

If +bucket_boundaries+ is not given, then no +bucket_counts+ may be given.

Defined Under Namespace

Classes: Explicit, Exponential, Linear

Instance Attribute Summary collapse

Instance Attribute Details

#explicit_bucketsGoogle::Api::Distribution::BucketOptions::Explicit

Returns The explicit buckets.

Returns:



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/google/cloud/logging/v2/doc/google/api/distribution.rb', line 113

class BucketOptions
  # Specify a sequence of buckets that all have the same width (except
  # overflow and underflow).  Each bucket represents a constant absolute
  # uncertainty on the specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket +i+:
  #
  #    Upper bound (0 <= i < N-1):     offset + (width * i).
  #    Lower bound (1 <= i < N):       offset + (width * (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] width
  #   @return [Float]
  #     Must be greater than 0.
  # @!attribute [rw] offset
  #   @return [Float]
  #     Lower bound of the first bucket.
  class Linear; end

  # Specify a sequence of buckets that have a width that is proportional to
  # the value of the lower bound.  Each bucket represents a constant relative
  # uncertainty on a specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
  #    Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] growth_factor
  #   @return [Float]
  #     Must be greater than 1.
  # @!attribute [rw] scale
  #   @return [Float]
  #     Must be greater than 0.
  class Exponential; end

  # A set of buckets with arbitrary widths.
  #
  # Defines +size(bounds) + 1+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     bounds[i]
  #    Lower bound (1 <= i < N);       bounds[i - 1]
  #
  # There must be at least one element in +bounds+.  If +bounds+ has only one
  # element, there are no finite buckets, and that single element is the
  # common boundary of the overflow and underflow buckets.
  # @!attribute [rw] bounds
  #   @return [Array<Float>]
  #     The values must be monotonically increasing.
  class Explicit; end
end

#exponential_bucketsGoogle::Api::Distribution::BucketOptions::Exponential

Returns The exponential buckets.

Returns:



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/google/cloud/logging/v2/doc/google/api/distribution.rb', line 113

class BucketOptions
  # Specify a sequence of buckets that all have the same width (except
  # overflow and underflow).  Each bucket represents a constant absolute
  # uncertainty on the specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket +i+:
  #
  #    Upper bound (0 <= i < N-1):     offset + (width * i).
  #    Lower bound (1 <= i < N):       offset + (width * (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] width
  #   @return [Float]
  #     Must be greater than 0.
  # @!attribute [rw] offset
  #   @return [Float]
  #     Lower bound of the first bucket.
  class Linear; end

  # Specify a sequence of buckets that have a width that is proportional to
  # the value of the lower bound.  Each bucket represents a constant relative
  # uncertainty on a specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
  #    Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] growth_factor
  #   @return [Float]
  #     Must be greater than 1.
  # @!attribute [rw] scale
  #   @return [Float]
  #     Must be greater than 0.
  class Exponential; end

  # A set of buckets with arbitrary widths.
  #
  # Defines +size(bounds) + 1+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     bounds[i]
  #    Lower bound (1 <= i < N);       bounds[i - 1]
  #
  # There must be at least one element in +bounds+.  If +bounds+ has only one
  # element, there are no finite buckets, and that single element is the
  # common boundary of the overflow and underflow buckets.
  # @!attribute [rw] bounds
  #   @return [Array<Float>]
  #     The values must be monotonically increasing.
  class Explicit; end
end

#linear_bucketsGoogle::Api::Distribution::BucketOptions::Linear

Returns The linear bucket.

Returns:



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/google/cloud/logging/v2/doc/google/api/distribution.rb', line 113

class BucketOptions
  # Specify a sequence of buckets that all have the same width (except
  # overflow and underflow).  Each bucket represents a constant absolute
  # uncertainty on the specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket +i+:
  #
  #    Upper bound (0 <= i < N-1):     offset + (width * i).
  #    Lower bound (1 <= i < N):       offset + (width * (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] width
  #   @return [Float]
  #     Must be greater than 0.
  # @!attribute [rw] offset
  #   @return [Float]
  #     Lower bound of the first bucket.
  class Linear; end

  # Specify a sequence of buckets that have a width that is proportional to
  # the value of the lower bound.  Each bucket represents a constant relative
  # uncertainty on a specific value in the bucket.
  #
  # Defines +num_finite_buckets + 2+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     scale * (growth_factor ^ i).
  #    Lower bound (1 <= i < N):       scale * (growth_factor ^ (i - 1)).
  # @!attribute [rw] num_finite_buckets
  #   @return [Integer]
  #     Must be greater than 0.
  # @!attribute [rw] growth_factor
  #   @return [Float]
  #     Must be greater than 1.
  # @!attribute [rw] scale
  #   @return [Float]
  #     Must be greater than 0.
  class Exponential; end

  # A set of buckets with arbitrary widths.
  #
  # Defines +size(bounds) + 1+ (= N) buckets with these boundaries for
  # bucket i:
  #
  #    Upper bound (0 <= i < N-1):     bounds[i]
  #    Lower bound (1 <= i < N);       bounds[i - 1]
  #
  # There must be at least one element in +bounds+.  If +bounds+ has only one
  # element, there are no finite buckets, and that single element is the
  # common boundary of the overflow and underflow buckets.
  # @!attribute [rw] bounds
  #   @return [Array<Float>]
  #     The values must be monotonically increasing.
  class Explicit; end
end