@ -7,7 +7,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
es "github.com/grafana/grafana/pkg/tsdb/elasticsearch/client"
"github.com/grafana/grafana/pkg/tsdb/intervalv2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -25,7 +24,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ { "type" : "date_histogram" , "field" : "@timestamp" , "id" : "2" } ] ,
"metrics" : [ { "type" : "count" , "id" : "0" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
rangeFilter := sr . Query . Bool . Filters [ 0 ] . ( * es . RangeFilter )
@ -45,7 +44,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ { "type" : "date_histogram" , "field" : "@timestamp" , "id" : "1" } ] ,
"metrics" : [ { "type" : "avg" , "id" : "0" , "settings" : { "missing" : "null" , "script" : "1" } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -63,7 +62,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "date_histogram" , "field" : "@timestamp" , "id" : "3" }
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -84,7 +83,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "date_histogram" , "field" : "@timestamp" , "id" : "2" }
] ,
"metrics" : [ { "type" : "avg" , "field" : "@value" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -113,7 +112,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "count" , "id" : "1" } ,
{ "type" : "avg" , "field" : "@value" , "id" : "5" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -137,7 +136,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "count" , "id" : "1" } ,
{ "type" : "avg" , "field" : "@value" , "id" : "5" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -168,7 +167,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"metrics" : [
{ "type" : "count" , "id" : "1" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -193,7 +192,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
} ,
{ "type" : "date_histogram" , "field" : "@timestamp" , "id" : "3" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -219,7 +218,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"metrics" : [
{ "type" : "percentiles" , "field" : "@value" , "id" : "1" , "settings" : { "percents" : [ "95" , "99" ] } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -248,7 +247,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"metrics" : [
{ "type" : "extended_stats" , "field" : "@value" , "id" : "1" , "meta" : { "std_deviation" : true } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -279,7 +278,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "count" , "id" : "1" } ,
{ "type" : "avg" , "field" : "@value" , "id" : "5" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -305,7 +304,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"metrics" : [
{ "type" : "count" , "id" : "1" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -332,7 +331,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -364,7 +363,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "date_histogram" , "field" : "@timestamp" , "id" : "4" }
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -395,7 +394,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
{ "type" : "date_histogram" , "field" : "@timestamp" , "id" : "4" }
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -417,7 +416,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ ] ,
"metrics" : [ { "id" : "1" , "type" : "raw_document" , "settings" : { } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -430,7 +429,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ ] ,
"metrics" : [ { "id" : "1" , "type" : "raw_document" , "settings" : { } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -452,7 +451,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ ] ,
"metrics" : [ { "id" : "1" , "type" : "raw_data" , "settings" : { } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -474,7 +473,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"timeField" : "@timestamp" ,
"bucketAggs" : [ ] ,
"metrics" : [ { "id" : "1" , "type" : "raw_document" , "settings" : { "size" : 1337 } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -494,7 +493,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -521,7 +520,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -544,7 +543,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -567,7 +566,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -589,7 +588,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -616,7 +615,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -642,7 +641,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
}
] ,
"metrics" : [ { "type" : "count" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -669,7 +668,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"field" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -705,7 +704,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -742,7 +741,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"field" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -774,7 +773,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -809,7 +808,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"type" : "moving_avg"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -846,7 +845,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "Metric to apply moving average"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -872,7 +871,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"metrics" : [
{ "id" : "2" , "type" : "top_metrics" , "settings" : { "order" : "desc" , "orderBy" : "@timestamp" , "metrics" : [ "@value" ] } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
firstLevel := sr . Aggs [ 0 ]
@ -902,7 +901,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -940,7 +939,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -976,7 +975,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "Metric to apply cumulative sum"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1007,7 +1006,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1037,7 +1036,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1066,7 +1065,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"field" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1097,7 +1096,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "lag" : "5" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1128,7 +1127,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "lag" : "5" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1157,7 +1156,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"pipelineAgg" : "3"
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1191,7 +1190,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "script" : "params.var1 * params.var2" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1228,7 +1227,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "script" : "params.var1 * params.var2" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1263,7 +1262,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "script" : "params.var1 * 1000" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1297,7 +1296,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
"settings" : { "script" : "params.var1 * 1000" }
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1318,7 +1317,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
_ , err := executeTsdbQuery ( c , ` {
"timeField" : "@timestamp" ,
"query" : "foo"
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
filter := sr . Query . Bool . Filters [ 1 ] . ( * es . QueryStringFilter )
@ -1331,7 +1330,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
_ , err := executeTsdbQuery ( c , ` {
"timeField" : "@timestamp" ,
"query" : "foo"
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
filter := sr . Query . Bool . Filters [ 1 ] . ( * es . QueryStringFilter )
@ -1344,7 +1343,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
_ , err := executeTsdbQuery ( c , ` {
"timeField" : "@timestamp" ,
"metrics" : [ { "type" : "logs" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
require . Equal ( t , sr . Size , defaultSize )
@ -1377,7 +1376,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
_ , err := executeTsdbQuery ( c , ` {
"timeField" : "@timestamp" ,
"metrics" : [ { "type" : "logs" , "id" : "1" , "settings" : { "limit" : 1000 } } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
require . Equal ( t , sr . Size , 1000 )
@ -1388,7 +1387,7 @@ func TestExecuteTimeSeriesQuery(t *testing.T) {
_ , err := executeTsdbQuery ( c , ` {
"timeField" : "@timestamp" ,
"metrics" : [ { "type" : "logs" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
require . Equal ( t , sr . CustomProps [ "highlight" ] , map [ string ] interface { } {
@ -1431,7 +1430,7 @@ func TestSettingsCasting(t *testing.T) {
}
] ,
"bucketAggs" : [ { "type" : "date_histogram" , "field" : "@timestamp" , "id" : "1" } ]
} ` , from , to , 15 * time . Second )
} ` , from , to )
require . NoError ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
movingAvgSettings := sr . Aggs [ 0 ] . Aggregation . Aggs [ 1 ] . Aggregation . Aggregation . ( * es . PipelineAggregation ) . Settings
@ -1475,7 +1474,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1510,7 +1509,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
serialDiffSettings := sr . Aggs [ 0 ] . Aggregation . Aggs [ 1 ] . Aggregation . Aggregation . ( * es . PipelineAggregation ) . Settings
@ -1537,7 +1536,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1573,7 +1572,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1608,7 +1607,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1635,7 +1634,7 @@ func TestSettingsCasting(t *testing.T) {
"metrics" : [
{ "id" : "1" , "type" : "average" , "field" : "@value" }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1672,7 +1671,7 @@ func TestSettingsCasting(t *testing.T) {
}
}
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1694,7 +1693,7 @@ func TestSettingsCasting(t *testing.T) {
"bucketAggs" : [
{ "type" : "date_histogram" , "id" : "2" , "settings" : { "min_doc_count" : "1" } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1710,7 +1709,7 @@ func TestSettingsCasting(t *testing.T) {
"bucketAggs" : [
{ "type" : "date_histogram" , "id" : "2" , "field" : "@time" , "settings" : { "min_doc_count" : "1" } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1726,7 +1725,7 @@ func TestSettingsCasting(t *testing.T) {
"bucketAggs" : [
{ "type" : "date_histogram" , "id" : "2" , "field" : "@time" , "settings" : { "min_doc_count" : "1" , "interval" : "1d" } }
]
} ` , from , to , 15 * time . Second )
} ` , from , to )
assert . Nil ( t , err )
sr := c . multisearchRequests [ 0 ] . Requests [ 0 ]
@ -1774,13 +1773,14 @@ func newDataQuery(body string) (backend.QueryDataRequest, error) {
return backend . QueryDataRequest {
Queries : [ ] backend . DataQuery {
{
JSON : json . RawMessage ( body ) ,
JSON : json . RawMessage ( body ) ,
Interval : 10 * time . Second ,
} ,
} ,
} , nil
}
func executeTsdbQuery ( c es . Client , body string , from , to time . Time , minInterval time . Duration ) (
func executeTsdbQuery ( c es . Client , body string , from , to time . Time ) (
* backend . QueryDataResponse , error ) {
timeRange := backend . TimeRange {
From : from ,
@ -1794,6 +1794,6 @@ func executeTsdbQuery(c es.Client, body string, from, to time.Time, minInterval
} ,
} ,
}
query := newTimeSeriesQuery ( c , dataRequest . Queries , intervalv2 . NewCalculator ( intervalv2 . CalculatorOptions { MinInterval : minInterval } ) )
query := newTimeSeriesQuery ( c , dataRequest . Queries )
return query . execute ( )
}