MCPcopy
hub / github.com/OpenTSDB/opentsdb / shiftDataPoint

Method shiftDataPoint

test/query/expression/TestTimeShift.java:72–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 }
71
72 @Test
73 public void shiftDataPoint() throws Exception {
74 DataPoint actualDp = timeshift.shift(DATA_POINTS[0], 60000L);
75 assertEquals(1356998460000L, actualDp.timestamp());
76 DataPoint actualDp1 = timeshift.shift(DATA_POINTS[1], this.timeshift.parseParam("+1week"));
77 assertEquals(1357605200000L, actualDp1.timestamp());
78 DataPoint actualDp2 = timeshift.shift(DATA_POINTS[1], this.timeshift.parseParam("+130days"));
79 assertEquals(1368232400000L, actualDp2.timestamp());
80 }
81}

Callers

nothing calls this directly

Calls 3

timestampMethod · 0.95
shiftMethod · 0.45
parseParamMethod · 0.45

Tested by

no test coverage detected