Class: Google::Apis::MonitoringV3::BucketOptions
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::BucketOptions
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/monitoring_v3/classes.rb,
generated/google/apis/monitoring_v3/representations.rb,
generated/google/apis/monitoring_v3/representations.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_options is not given, then no bucket_counts may be given.
Instance Attribute Summary collapse
-
#explicit_buckets ⇒ Google::Apis::MonitoringV3::Explicit
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): boundsi Lower bound (1 <= i < N); boundsi - 1There must be at least one element in bounds.
-
#exponential_buckets ⇒ Google::Apis::MonitoringV3::Exponential
Specify a sequence of buckets that have a width that is proportional to the value of the lower bound.
-
#linear_buckets ⇒ Google::Apis::MonitoringV3::Linear
Specify a sequence of buckets that all have the same width (except overflow and underflow).
Instance Method Summary collapse
-
#initialize(**args) ⇒ BucketOptions
constructor
A new instance of BucketOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ BucketOptions
Returns a new instance of BucketOptions
1091 1092 1093 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1091 def initialize(**args) update!(**args) end |
Instance Attribute Details
#explicit_buckets ⇒ Google::Apis::MonitoringV3::Explicit
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): boundsi Lower
bound (1 <= i < N); boundsi - 1There 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.
Corresponds to the JSON property explicitBuckets
1089 1090 1091 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1089 def explicit_buckets @explicit_buckets end |
#exponential_buckets ⇒ Google::Apis::MonitoringV3::Exponential
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)).
Corresponds to the JSON property exponentialBuckets
1071 1072 1073 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1071 def exponential_buckets @exponential_buckets end |
#linear_buckets ⇒ Google::Apis::MonitoringV3::Linear
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)).
Corresponds to the JSON property linearBuckets
1080 1081 1082 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1080 def linear_buckets @linear_buckets end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1096 1097 1098 1099 1100 |
# File 'generated/google/apis/monitoring_v3/classes.rb', line 1096 def update!(**args) @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) end |