Move comments above struct fields.
This commit is contained in:
parent
61b9783585
commit
e4773dacdd
|
|
@ -42,10 +42,13 @@ func NewCircularBuffer(size int) CircularBuffer {
|
|||
}
|
||||
|
||||
type circularBuffer struct {
|
||||
buffer []float64
|
||||
head int // Index of the most recently added element.
|
||||
capacity int // Max number of elements.
|
||||
isFull bool // The number of elements in the buffer equals capacity.
|
||||
buffer []float64
|
||||
// Index of the most recently added element.
|
||||
head int
|
||||
// Max number of elements.
|
||||
capacity int
|
||||
// The number of elements in the buffer equals capacity.
|
||||
isFull bool
|
||||
}
|
||||
|
||||
// Head returns a pointer to the most recently added element. The pointer can be
|
||||
|
|
|
|||
|
|
@ -45,9 +45,12 @@ func NewHistogram(options HistogramOptions) Histogram {
|
|||
// There's no interpolation within buckets (i.e. one sample falls to exactly one
|
||||
// bucket).
|
||||
type histogram struct {
|
||||
options *HistogramOptions // Bucketing scheme.
|
||||
buckets []float64 // Weight of samples in each bucket.
|
||||
totalWeight float64 // Weight of samples in all buckets.
|
||||
// Bucketing scheme.
|
||||
options *HistogramOptions
|
||||
// Weight of samples in each bucket.
|
||||
buckets []float64
|
||||
// Weight of samples in all buckets.
|
||||
totalWeight float64
|
||||
// Index of the first non-empty bucket if there's any. Otherwise index
|
||||
// of the last bucket.
|
||||
minBucket int
|
||||
|
|
|
|||
Loading…
Reference in New Issue