Fixes a panic with wrong values in e2elatency

This commit is contained in:
Marcel Gaedigk
2016-08-05 15:47:59 +02:00
parent a863ac9d77
commit 18e4915520
2 changed files with 9 additions and 2 deletions

View File

@ -59,7 +59,7 @@ func ChannelStats(namespace string) StatsCollector {
}, labels),
},
{
val: func(c *channel) float64 { return c.E2eLatency.Percentiles[0]["value"] },
val: func(c *channel) float64 { return c.E2eLatency.percentileValue(0) },
vec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: namespace,
Name: "e2e_latency_99p",
@ -67,7 +67,7 @@ func ChannelStats(namespace string) StatsCollector {
}, labels),
},
{
val: func(c *channel) float64 { return c.E2eLatency.Percentiles[1]["value"] },
val: func(c *channel) float64 { return c.E2eLatency.percentileValue(1) },
vec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: namespace,
Name: "e2e_latency_95p",