Naireen commented on code in PR #34017:
URL: https://github.com/apache/beam/pull/34017#discussion_r1962479342


##########
model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/metrics.proto:
##########
@@ -628,6 +628,79 @@ message BoundedTrie {
   repeated string singleton = 3;
 }
 
+// The message type used for encoding Histogram Data
+message HistogramValue {
+  // Number of values recorded in this histogram.
+  optional int64 count = 1;
+
+  // `BucketOptions` describes the bucket boundaries used in the histogram.
+  message BucketOptions {
+    // Linear buckets with the following boundaries for indices in 0 to n-1.
+    // - i in [0, n-1]:  [start + (i)*width, start + (i+1)*width)
+    message Linear {
+      // Must be greater than 0.
+      //
+      // (-- api-linter: core::0140::prepositions=disabled
+      //     aip.dev/not-precedent: `bucket_count` would cause confusion with
+      //     `bucket_counts` field --)
+      optional int32 number_of_buckets = 1;
+      // Distance between bucket boundaries. Must be greater than 0.
+      optional double width = 2;
+      // Lower bound of the first bucket.
+      optional double start = 3;
+    }
+
+    // Exponential buckets where the growth factor between buckets is
+    // `2**(2**-scale)`. e.g. for `scale=1` growth factor is
+    // `2**(2**(-1))=sqrt(2)`. `n` buckets will have the following boundaries.
+    //  - 0th: [0, gf)
+    //  - i in [1, n-1]: [gf^(i), gf^(i+1))
+    message Base2Exponent {
+      // Must be greater than 0.
+      //
+      // (-- api-linter: core::0140::prepositions=disabled
+      //     aip.dev/not-precedent: `bucket_count` would cause confusion with
+      //     `bucket_counts` field --)
+      optional int32 number_of_buckets = 1;
+      // Must be between -3 and 3. This forces the growth factor of the bucket
+      // boundaries to be between `2^(1/8)` and `256`.
+      optional int32 scale = 2;
+    }
+    oneof bucket_type {
+      // Bucket boundaries grow linearly.
+      Linear linear = 1;
+      // Bucket boundaries grow exponentially.
+      Base2Exponent exponential = 2;
+    }
+  }
+
+  // Describes the bucket boundaries used in the histogram.
+  optional BucketOptions bucket_options = 2;
+
+  // The number of values in each bucket of the histogram, as described in
+  // `bucket_options`. `bucket_counts` should contain N values, where N is the
+  // number of buckets specified in `bucket_options`. If `bucket_counts` has
+  // fewer than N values, the remaining values are assumed to be 0.
+  repeated int64 bucket_counts = 3;
+
+  // Statistics for the underflow and overflow bucket.
+  message OutlierStats {

Review Comment:
   I have removed the outlier stats, since we don't currently use them either 
for encoding or decoding, so it simplifies this a bit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to