glide up
This commit is contained in:
16
vendor/github.com/go-kit/kit/metrics/influx/influx.go
generated
vendored
16
vendor/github.com/go-kit/kit/metrics/influx/influx.go
generated
vendored
@@ -66,7 +66,6 @@ func (in *Influx) NewGauge(name string) *Gauge {
|
||||
return &Gauge{
|
||||
name: name,
|
||||
obs: in.gauges.Observe,
|
||||
add: in.gauges.Add,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,14 +168,10 @@ func mergeTags(tags map[string]string, labelValues []string) map[string]string {
|
||||
if len(labelValues)%2 != 0 {
|
||||
panic("mergeTags received a labelValues with an odd number of strings")
|
||||
}
|
||||
ret := make(map[string]string, len(tags)+len(labelValues)/2)
|
||||
for k, v := range tags {
|
||||
ret[k] = v
|
||||
}
|
||||
for i := 0; i < len(labelValues); i += 2 {
|
||||
ret[labelValues[i]] = labelValues[i+1]
|
||||
tags[labelValues[i]] = labelValues[i+1]
|
||||
}
|
||||
return ret
|
||||
return tags
|
||||
}
|
||||
|
||||
func sum(a []float64) float64 {
|
||||
@@ -221,7 +216,6 @@ type Gauge struct {
|
||||
name string
|
||||
lvs lv.LabelValues
|
||||
obs observeFunc
|
||||
add observeFunc
|
||||
}
|
||||
|
||||
// With implements metrics.Gauge.
|
||||
@@ -230,7 +224,6 @@ func (g *Gauge) With(labelValues ...string) metrics.Gauge {
|
||||
name: g.name,
|
||||
lvs: g.lvs.With(labelValues...),
|
||||
obs: g.obs,
|
||||
add: g.add,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,11 +232,6 @@ func (g *Gauge) Set(value float64) {
|
||||
g.obs(g.name, g.lvs, value)
|
||||
}
|
||||
|
||||
// Add implements metrics.Gauge.
|
||||
func (g *Gauge) Add(delta float64) {
|
||||
g.add(g.name, g.lvs, delta)
|
||||
}
|
||||
|
||||
// Histogram is an Influx histrogram. Observations are aggregated into a
|
||||
// generic.Histogram and emitted as per-quantile gauges to the Influx server.
|
||||
type Histogram struct {
|
||||
|
||||
Reference in New Issue
Block a user