Skip to content

Commit

Permalink
Cleanup function ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 committed Jan 26, 2024
1 parent e5ecb9d commit 18a471f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metrics/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ type SampleSnapshot interface {
Variance() float64
}

func NewBoundedHistogramSample() Sample {
return NewSlidingTimeWindowArraySample(time.Minute * 1)
}

// Samples maintain a statistically-significant selection of values from
// a stream.
type Sample interface {
Expand All @@ -36,6 +32,10 @@ type Sample interface {
Update(int64)
}

func NewBoundedHistogramSample() Sample {
return NewSlidingTimeWindowArraySample(time.Minute * 1)
}

// ExpDecaySample is an exponentially-decaying sample using a forward-decaying
// priority reservoir. See Cormode et al's "Forward Decay: A Practical Time
// Decay Model for Streaming Systems".
Expand Down

0 comments on commit 18a471f

Please sign in to comment.