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

Method runLongTwoGroup

test/core/TestTsdbQueryQueries.java:173–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171 }
172
173 @Test
174 public void runLongTwoGroup() throws Exception {
175 storeLongTimeSeriesSeconds(true, false);
176
177 tags.clear();
178 tags.put(TAGK_STRING , "*");
179 query.setStartTime(1356998400);
180 query.setEndTime(1357041600);
181 query.setTimeSeries(METRIC_STRING, tags, Aggregators.SUM, false);
182
183 final DataPoints[] dps = query.run();
184 assertMeta(dps, 0, false);
185 assertMeta(dps, 1, false);
186 assertEquals(2, dps.length);
187
188 int value = 1;
189 long timestamp = 1356998430000L;
190 for (DataPoint dp : dps[0]) {
191 assertEquals(value, dp.longValue());
192 assertEquals(timestamp, dp.timestamp());
193 value++;
194 timestamp += 30000;
195 }
196 assertEquals(300, dps[0].size());
197
198 value = 300;
199 timestamp = 1356998430000L;
200 for (DataPoint dp : dps[1]) {
201 assertEquals(value, dp.longValue());
202 assertEquals(timestamp, dp.timestamp());
203 value--;
204 timestamp += 30000;
205 }
206 assertEquals(300, dps[1].size());
207 }
208
209 @Test
210 public void runLongSingleTSRate() throws Exception {

Callers

nothing calls this directly

Calls 11

clearMethod · 0.80
putMethod · 0.80
assertMetaMethod · 0.80
setStartTimeMethod · 0.65
setEndTimeMethod · 0.65
setTimeSeriesMethod · 0.65
runMethod · 0.65
longValueMethod · 0.65
timestampMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected