Class: Google::Apis::DataflowV1b3::Histogram
- Inherits:
-
Object
- Object
- Google::Apis::DataflowV1b3::Histogram
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/dataflow_v1b3/classes.rb,
generated/google/apis/dataflow_v1b3/representations.rb,
generated/google/apis/dataflow_v1b3/representations.rb
Overview
Histogram of value counts for a distribution. Buckets have an inclusive lower bound and exclusive upper bound and use "1,2,5 bucketing": The first bucket range is from [0,1) and all subsequent bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus, bucket boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, ... Negative values are not supported.
Instance Attribute Summary collapse
-
#bucket_counts ⇒ Array<Fixnum>
Counts of values in each bucket.
-
#first_bucket_offset ⇒ Fixnum
Starting index of first stored bucket.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Histogram
constructor
A new instance of Histogram.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Histogram
Returns a new instance of Histogram
1389 1390 1391 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1389 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bucket_counts ⇒ Array<Fixnum>
Counts of values in each bucket. For efficiency, prefix and trailing
buckets with count = 0 are elided. Buckets can store the full range of
values of an unsigned long, with ULLONG_MAX falling into the 59th bucket
with range [1e19, 2e19).
Corresponds to the JSON property bucketCounts
1380 1381 1382 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1380 def bucket_counts @bucket_counts end |
#first_bucket_offset ⇒ Fixnum
Starting index of first stored bucket. The non-inclusive upper-bound of
the ith bucket is given by:
pow(10,(i-first_bucket_offset)/3) * (1,2,5)[(i-first_bucket_offset)%3]
Corresponds to the JSON property firstBucketOffset
1387 1388 1389 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1387 def first_bucket_offset @first_bucket_offset end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1394 1395 1396 1397 |
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1394 def update!(**args) @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) @first_bucket_offset = args[:first_bucket_offset] if args.key?(:first_bucket_offset) end |