aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/rcrowley/go-metrics/sample.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/rcrowley/go-metrics/sample.go')
-rw-r--r--vendor/github.com/rcrowley/go-metrics/sample.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/rcrowley/go-metrics/sample.go b/vendor/github.com/rcrowley/go-metrics/sample.go
index 5f6a37788..fecee5ef6 100644
--- a/vendor/github.com/rcrowley/go-metrics/sample.go
+++ b/vendor/github.com/rcrowley/go-metrics/sample.go
@@ -33,7 +33,7 @@ type Sample interface {
// priority reservoir. See Cormode et al's "Forward Decay: A Practical Time
// Decay Model for Streaming Systems".
//
-// <http://www.research.att.com/people/Cormode_Graham/library/publications/CormodeShkapenyukSrivastavaXu09.pdf>
+// <http://dimacs.rutgers.edu/~graham/pubs/papers/fwddecay.pdf>
type ExpDecaySample struct {
alpha float64
count int64
@@ -302,6 +302,13 @@ type SampleSnapshot struct {
values []int64
}
+func NewSampleSnapshot(count int64, values []int64) *SampleSnapshot {
+ return &SampleSnapshot{
+ count: count,
+ values: values,
+ }
+}
+
// Clear panics.
func (*SampleSnapshot) Clear() {
panic("Clear called on a SampleSnapshot")