Address review comments
This commit is contained in:
@ -12,9 +12,6 @@ import (
|
|||||||
|
|
||||||
// Histogram accumulates values in the form of a histogram with
|
// Histogram accumulates values in the form of a histogram with
|
||||||
// exponentially increased bucket sizes.
|
// exponentially increased bucket sizes.
|
||||||
// The first bucket (with index 0) is [0, n) where n = baseBucketSize.
|
|
||||||
// Bucket i (i>=1) contains [n * m^(i-1), n * m^i), where m = 1 + GrowthFactor.
|
|
||||||
// The type of the values is int64.
|
|
||||||
type Histogram struct {
|
type Histogram struct {
|
||||||
// Count is the total number of values added to the histogram.
|
// Count is the total number of values added to the histogram.
|
||||||
Count int64
|
Count int64
|
||||||
@ -35,6 +32,10 @@ type Histogram struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HistogramOptions contains the parameters that define the histogram's buckets.
|
// HistogramOptions contains the parameters that define the histogram's buckets.
|
||||||
|
// The first bucket of the created histogram (with index 0) contains [min, min+n)
|
||||||
|
// where n = BaseBucketSize, min = MinValue.
|
||||||
|
// Bucket i (i>=1) contains [min + n * m^(i-1), min + n * m^i), where m = 1+GrowthFactor.
|
||||||
|
// The type of the values is int64.
|
||||||
type HistogramOptions struct {
|
type HistogramOptions struct {
|
||||||
// NumBuckets is the number of buckets.
|
// NumBuckets is the number of buckets.
|
||||||
NumBuckets int
|
NumBuckets int
|
||||||
@ -47,7 +48,7 @@ type HistogramOptions struct {
|
|||||||
MinValue int64
|
MinValue int64
|
||||||
}
|
}
|
||||||
|
|
||||||
// HistogramBucket is one histogram bucket.
|
// HistogramBucket represents one histogram bucket.
|
||||||
type HistogramBucket struct {
|
type HistogramBucket struct {
|
||||||
// LowBound is the lower bound of the bucket.
|
// LowBound is the lower bound of the bucket.
|
||||||
LowBound float64
|
LowBound float64
|
||||||
|
Reference in New Issue
Block a user