return empty array for no datapoints

This commit is contained in:
Mitsuhiro Tanda 2017-11-12 00:48:54 +09:00
parent 5e11f1a2a1
commit 6488ccd113

View File

@ -315,7 +315,8 @@ func parseResponse(resp *cloudwatch.GetMetricStatisticsOutput, query *CloudWatch
var value float64
for _, s := range append(query.Statistics, query.ExtendedStatistics...) {
series := tsdb.TimeSeries{
Tags: map[string]string{},
Tags: map[string]string{},
Points: make([]tsdb.TimePoint, 0),
}
for _, d := range query.Dimensions {
series.Tags[*d.Name] = *d.Value