@Test public void lookBackTest() throws Exception { assertEquals(Duration.ZERO, create().getLookBack().hintDuration()); assertEquals(Duration.standardMinutes(5), create("5m").getLookBack().hintDuration()); }
@Override public ExpressionLookBack getLookBack() { return interval_ .map(ExpressionLookBack::fromInterval) .orElseGet(() -> ExpressionLookBack.fromScrapeCount(1)) .andThen(arg_.getLookBack()); }
RateExpression implements TimeSeriesMetricExpression { @Override public ExpressionLookBack getLookBack() { return interval_ .map(ExpressionLookBack::fromInterval) .orElseGet(() -> ExpressionLookBack.fromScrapeCount(1)) .andThen(arg_.getLookBack()); } }
RateExpression implements TimeSeriesMetricExpression { @Override public ExpressionLookBack getLookBack() { return interval_ .map(ExpressionLookBack::fromInterval) .orElseGet(() -> ExpressionLookBack.fromScrapeCount(1)) .andThen(arg_.getLookBack()); } RateExpression(TimeSeriesMetricExpression arg);  RateExpression(TimeSeriesMetricExpression arg, Duration interval);  RateExpression(TimeSeriesMetricExpression arg, Optional<Duration> interval); }
RateExpression implements TimeSeriesMetricExpression { @Override public ExpressionLookBack getLookBack() { return interval_ .map(ExpressionLookBack::fromInterval) .orElseGet(() -> ExpressionLookBack.fromScrapeCount(1)) .andThen(arg_.getLookBack()); } RateExpression(TimeSeriesMetricExpression arg);  RateExpression(TimeSeriesMetricExpression arg, Duration interval);  RateExpression(TimeSeriesMetricExpression arg, Optional<Duration> interval); @Override Collection<TimeSeriesMetricExpression> getChildren(); @Override TimeSeriesMetricDeltaSet apply(Context ctx); @Override ExpressionLookBack getLookBack(); @Override int getPriority(); @Override StringBuilder configString(); }
RateExpression implements TimeSeriesMetricExpression { @Override public ExpressionLookBack getLookBack() { return interval_ .map(ExpressionLookBack::fromInterval) .orElseGet(() -> ExpressionLookBack.fromScrapeCount(1)) .andThen(arg_.getLookBack()); } RateExpression(TimeSeriesMetricExpression arg);  RateExpression(TimeSeriesMetricExpression arg, Duration interval);  RateExpression(TimeSeriesMetricExpression arg, Optional<Duration> interval); @Override Collection<TimeSeriesMetricExpression> getChildren(); @Override TimeSeriesMetricDeltaSet apply(Context ctx); @Override ExpressionLookBack getLookBack(); @Override int getPriority(); @Override StringBuilder configString();  }