scheduler_perf: do not override throughput labels

Throughput labels are currently initialized with a "Name" label.
So we need to append to the map instead of creating a new one.
This commit is contained in:
Jan Chaloupka 2020-02-28 16:10:48 +01:00
parent 7587ab3ef3
commit 5b3b4de972

View File

@ -243,9 +243,7 @@ func (tc *throughputCollector) collect() []DataItem {
sum += tc.schedulingThroughputs[i]
}
throughputSummary.Labels = map[string]string{
"Metric": "SchedulingThroughput",
}
throughputSummary.Labels["Metric"] = "SchedulingThroughput"
throughputSummary.Data = map[string]float64{
"Average": sum / float64(length),
"Perc50": tc.schedulingThroughputs[int(math.Ceil(float64(length*50)/100))-1],