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

@ -48,6 +48,13 @@ type e2elatency struct {
Percentiles []map[string]float64 `json:"percentiles"`
}
func (e *e2elatency) percentileValue(idx int) float64 {
if idx >= len(e.Percentiles) {
return 0
}
return e.Percentiles[idx]["value"]
}
type client struct {
ID string `json:"client_id"`
Hostname string `json:"hostname"`