aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-29 01:05:01 +0800
committerFelix Lange <fjl@twurst.com>2016-10-29 01:05:01 +0800
commit289b30715d097edafd5562f66cb3567a70b2d330 (patch)
tree7eaaa6da97c84727469303b986e364606ece57ce /Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go
parent77703045765343c489ded2f43e3ed0f332c5f148 (diff)
downloadgo-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar.gz
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar.bz2
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar.lz
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar.xz
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.tar.zst
go-tangerine-289b30715d097edafd5562f66cb3567a70b2d330.zip
Godeps, vendor: convert dependency management to trash (#3198)
This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor.
Diffstat (limited to 'Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go')
-rw-r--r--Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go78
1 files changed, 0 insertions, 78 deletions
diff --git a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go b/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go
deleted file mode 100644
index 693f19085..000000000
--- a/Godeps/_workspace/src/github.com/rcrowley/go-metrics/syslog.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// +build !windows
-
-package metrics
-
-import (
- "fmt"
- "log/syslog"
- "time"
-)
-
-// Output each metric in the given registry to syslog periodically using
-// the given syslogger.
-func Syslog(r Registry, d time.Duration, w *syslog.Writer) {
- for _ = range time.Tick(d) {
- r.Each(func(name string, i interface{}) {
- switch metric := i.(type) {
- case Counter:
- w.Info(fmt.Sprintf("counter %s: count: %d", name, metric.Count()))
- case Gauge:
- w.Info(fmt.Sprintf("gauge %s: value: %d", name, metric.Value()))
- case GaugeFloat64:
- w.Info(fmt.Sprintf("gauge %s: value: %f", name, metric.Value()))
- case Healthcheck:
- metric.Check()
- w.Info(fmt.Sprintf("healthcheck %s: error: %v", name, metric.Error()))
- case Histogram:
- h := metric.Snapshot()
- ps := h.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999})
- w.Info(fmt.Sprintf(
- "histogram %s: count: %d min: %d max: %d mean: %.2f stddev: %.2f median: %.2f 75%%: %.2f 95%%: %.2f 99%%: %.2f 99.9%%: %.2f",
- name,
- h.Count(),
- h.Min(),
- h.Max(),
- h.Mean(),
- h.StdDev(),
- ps[0],
- ps[1],
- ps[2],
- ps[3],
- ps[4],
- ))
- case Meter:
- m := metric.Snapshot()
- w.Info(fmt.Sprintf(
- "meter %s: count: %d 1-min: %.2f 5-min: %.2f 15-min: %.2f mean: %.2f",
- name,
- m.Count(),
- m.Rate1(),
- m.Rate5(),
- m.Rate15(),
- m.RateMean(),
- ))
- case Timer:
- t := metric.Snapshot()
- ps := t.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999})
- w.Info(fmt.Sprintf(
- "timer %s: count: %d min: %d max: %d mean: %.2f stddev: %.2f median: %.2f 75%%: %.2f 95%%: %.2f 99%%: %.2f 99.9%%: %.2f 1-min: %.2f 5-min: %.2f 15-min: %.2f mean-rate: %.2f",
- name,
- t.Count(),
- t.Min(),
- t.Max(),
- t.Mean(),
- t.StdDev(),
- ps[0],
- ps[1],
- ps[2],
- ps[3],
- ps[4],
- t.Rate1(),
- t.Rate5(),
- t.Rate15(),
- t.RateMean(),
- ))
- }
- })
- }
-}