summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/armon
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-11-13 09:09:58 -0800
committerGitHub <noreply@github.com>2017-11-13 09:09:58 -0800
commit1329aa51b605cb54ba9aae3a82a0a87b881fb7b3 (patch)
tree93cbf354ab894a560fc2cef8ef685d681b4ff889 /vendor/github.com/armon
parent7304a61ef597970be3031b14e652fb3a4df44304 (diff)
downloadchat-1329aa51b605cb54ba9aae3a82a0a87b881fb7b3.tar.gz
chat-1329aa51b605cb54ba9aae3a82a0a87b881fb7b3.tar.bz2
chat-1329aa51b605cb54ba9aae3a82a0a87b881fb7b3.zip
Updating server dependancies. (#7816)
Diffstat (limited to 'vendor/github.com/armon')
-rw-r--r--vendor/github.com/armon/go-metrics/inmem.go4
-rw-r--r--vendor/github.com/armon/go-metrics/inmem_endpoint_test.go8
-rw-r--r--vendor/github.com/armon/go-metrics/inmem_test.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/armon/go-metrics/inmem.go b/vendor/github.com/armon/go-metrics/inmem.go
index cd1773042..8fe1de802 100644
--- a/vendor/github.com/armon/go-metrics/inmem.go
+++ b/vendor/github.com/armon/go-metrics/inmem.go
@@ -70,7 +70,7 @@ func NewIntervalMetrics(intv time.Time) *IntervalMetrics {
// about a sample
type AggregateSample struct {
Count int // The count of emitted pairs
- Rate float64 `json:"-"` // The count of emitted pairs per time unit (usually 1 second)
+ Rate float64 // The values rate per time unit (usually 1 second)
Sum float64 // The sum of values
SumSq float64 `json:"-"` // The sum of squared values
Min float64 // Minimum value
@@ -107,7 +107,7 @@ func (a *AggregateSample) Ingest(v float64, rateDenom float64) {
if v > a.Max || a.Count == 1 {
a.Max = v
}
- a.Rate = float64(a.Count) / rateDenom
+ a.Rate = float64(a.Sum) / rateDenom
a.LastUpdated = time.Now()
}
diff --git a/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go b/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go
index 326d56ada..f9c6793b6 100644
--- a/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go
+++ b/vendor/github.com/armon/go-metrics/inmem_endpoint_test.go
@@ -61,7 +61,7 @@ func TestDisplayMetrics(t *testing.T) {
Max: 22,
Sum: 42,
SumSq: 884,
- Rate: 200,
+ Rate: 4200,
},
Mean: 21,
Stddev: 1.4142135623730951,
@@ -75,7 +75,7 @@ func TestDisplayMetrics(t *testing.T) {
Max: 40,
Sum: 60,
SumSq: 2000,
- Rate: 200,
+ Rate: 6000,
},
Mean: 30,
Stddev: 14.142135623730951,
@@ -92,7 +92,7 @@ func TestDisplayMetrics(t *testing.T) {
Max: 24,
Sum: 44,
SumSq: 976,
- Rate: 200,
+ Rate: 4400,
},
Mean: 22,
Stddev: 2.8284271247461903,
@@ -106,7 +106,7 @@ func TestDisplayMetrics(t *testing.T) {
Max: 33,
Sum: 56,
SumSq: 1618,
- Rate: 200,
+ Rate: 5600,
},
Mean: 28,
Stddev: 7.0710678118654755,
diff --git a/vendor/github.com/armon/go-metrics/inmem_test.go b/vendor/github.com/armon/go-metrics/inmem_test.go
index 8d30e7c30..3b037c70d 100644
--- a/vendor/github.com/armon/go-metrics/inmem_test.go
+++ b/vendor/github.com/armon/go-metrics/inmem_test.go
@@ -53,7 +53,7 @@ func TestInmemSink(t *testing.T) {
if agg.Count != 2 {
t.Fatalf("bad val: %v", agg)
}
- if agg.Rate != 200 {
+ if agg.Rate != 4200 {
t.Fatalf("bad val: %v", agg.Rate)
}
if agg.Sum != 42 {