MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / configureFromQueryWithRate

Method configureFromQueryWithRate

test/core/TestTsdbQuery.java:226–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224 }
225
226 @Test
227 public void configureFromQueryWithRate() throws Exception {
228 setDataPointStorage();
229 final TSQuery ts_query = getTSQuery();
230 final RateOptions rate_options = new RateOptions();
231 rate_options.setResetValue(1024);
232 ts_query.getQueries().get(0).setRateOptions(rate_options);
233 ts_query.validateAndSetQuery();
234 query = new TsdbQuery(tsdb);
235 query.configureFromQuery(ts_query, 0).joinUninterruptibly();
236
237 assertArrayEquals(METRIC_BYTES, ForTesting.getMetric(query));
238 assertEquals(1, ForTesting.getFilters(query).size());
239 assertArrayEquals(TAGK_BYTES, ForTesting.getGroupBys(query).get(0));
240 assertEquals(1, ForTesting.getGroupBys(query).size());
241 assertTrue(rate_options == ForTesting.getRateOptions(query));
242 }
243
244 @Test
245 public void configureFromQueryNoTags() throws Exception {

Callers

nothing calls this directly

Calls 13

getTSQueryMethod · 0.95
setResetValueMethod · 0.95
getQueriesMethod · 0.95
validateAndSetQueryMethod · 0.95
getMetricMethod · 0.95
getFiltersMethod · 0.95
getGroupBysMethod · 0.95
getRateOptionsMethod · 0.95
setDataPointStorageMethod · 0.80
setRateOptionsMethod · 0.80
configureFromQueryMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected