mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Prometheus: Preallocate data for Prometheus backend response parsing (#17490)
This commit is contained in:
parent
4ddb860727
commit
6a76a92aff
@ -199,8 +199,9 @@ func parseResponse(value model.Value, query *PrometheusQuery) (*tsdb.QueryResult
|
||||
|
||||
for _, v := range data {
|
||||
series := tsdb.TimeSeries{
|
||||
Name: formatLegend(v.Metric, query),
|
||||
Tags: map[string]string{},
|
||||
Name: formatLegend(v.Metric, query),
|
||||
Tags: make(map[string]string, len(v.Metric)),
|
||||
Points: make([]tsdb.TimePoint, 0, len(v.Values)),
|
||||
}
|
||||
|
||||
for k, v := range v.Metric {
|
||||
|
Loading…
Reference in New Issue
Block a user