aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/VividCortex/ewma
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/VividCortex/ewma')
-rw-r--r--vendor/github.com/VividCortex/ewma/.gitignore1
-rw-r--r--vendor/github.com/VividCortex/ewma/.whitesource3
-rw-r--r--vendor/github.com/VividCortex/ewma/README.md29
-rw-r--r--vendor/github.com/VividCortex/ewma/codecov.yml6
-rw-r--r--vendor/github.com/VividCortex/ewma/go.mod3
5 files changed, 30 insertions, 12 deletions
diff --git a/vendor/github.com/VividCortex/ewma/.gitignore b/vendor/github.com/VividCortex/ewma/.gitignore
index 6c7104aef..c66769f6c 100644
--- a/vendor/github.com/VividCortex/ewma/.gitignore
+++ b/vendor/github.com/VividCortex/ewma/.gitignore
@@ -1,2 +1,3 @@
.DS_Store
.*.sw?
+/coverage.txt \ No newline at end of file
diff --git a/vendor/github.com/VividCortex/ewma/.whitesource b/vendor/github.com/VividCortex/ewma/.whitesource
new file mode 100644
index 000000000..d7eebc0cf
--- /dev/null
+++ b/vendor/github.com/VividCortex/ewma/.whitesource
@@ -0,0 +1,3 @@
+{
+ "settingsInheritedFrom": "VividCortex/whitesource-config@master"
+} \ No newline at end of file
diff --git a/vendor/github.com/VividCortex/ewma/README.md b/vendor/github.com/VividCortex/ewma/README.md
index 7aab61b87..87b4a3c7e 100644
--- a/vendor/github.com/VividCortex/ewma/README.md
+++ b/vendor/github.com/VividCortex/ewma/README.md
@@ -1,4 +1,8 @@
-# EWMA [![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma) ![Build Status](https://circleci.com/gh/VividCortex/moving_average.png?circle-token=1459fa37f9ca0e50cef05d1963146d96d47ea523)
+# EWMA
+
+[![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma)
+![build](https://github.com/VividCortex/ewma/workflows/build/badge.svg)
+[![codecov](https://codecov.io/gh/VividCortex/ewma/branch/master/graph/badge.svg)](https://codecov.io/gh/VividCortex/ewma)
This repo provides Exponentially Weighted Moving Average algorithms, or EWMAs for short, [based on our
Quantifying Abnormal Behavior talk](https://vividcortex.com/blog/2013/07/23/a-fast-go-library-for-exponential-moving-averages/).
@@ -103,23 +107,24 @@ View the GoDoc generated documentation [here](http://godoc.org/github.com/VividC
```go
package main
+
import "github.com/VividCortex/ewma"
func main() {
- samples := [100]float64{
- 4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
- }
+ samples := [100]float64{
+ 4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
+ }
- e := ewma.NewMovingAverage() //=> Returns a SimpleEWMA if called without params
- a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
+ e := ewma.NewMovingAverage() //=> Returns a SimpleEWMA if called without params
+ a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
- for _, f := range samples {
- e.Add(f)
- a.Add(f)
- }
+ for _, f := range samples {
+ e.Add(f)
+ a.Add(f)
+ }
- e.Value() //=> 13.577404704631077
- a.Value() //=> 1.5806140565521463e-12
+ e.Value() //=> 13.577404704631077
+ a.Value() //=> 1.5806140565521463e-12
}
```
diff --git a/vendor/github.com/VividCortex/ewma/codecov.yml b/vendor/github.com/VividCortex/ewma/codecov.yml
new file mode 100644
index 000000000..0d36d903f
--- /dev/null
+++ b/vendor/github.com/VividCortex/ewma/codecov.yml
@@ -0,0 +1,6 @@
+coverage:
+ status:
+ project:
+ default:
+ threshold: 15%
+ patch: off
diff --git a/vendor/github.com/VividCortex/ewma/go.mod b/vendor/github.com/VividCortex/ewma/go.mod
new file mode 100644
index 000000000..e481e3dfb
--- /dev/null
+++ b/vendor/github.com/VividCortex/ewma/go.mod
@@ -0,0 +1,3 @@
+module github.com/VividCortex/ewma
+
+go 1.12