@Test public void configStringTest() throws Exception { assertEquals("rate(G x)", create().configString().toString()); assertEquals("rate[1m](G x)", create("60s").configString().toString()); }
@Override public StringBuilder configString() { return new StringBuilder() .append("rate") .append(interval_.map(ConfigSupport::durationConfigString).map(s -> "[" + s + "]").orElse("")) .append('(') .append(arg_.configString()) .append(')'); }
RateExpression implements TimeSeriesMetricExpression { @Override public StringBuilder configString() { return new StringBuilder() .append("rate") .append(interval_.map(ConfigSupport::durationConfigString).map(s -> "[" + s + "]").orElse("")) .append('(') .append(arg_.configString()) .append(')'); } }
RateExpression implements TimeSeriesMetricExpression { @Override public StringBuilder configString() { return new StringBuilder() .append("rate") .append(interval_.map(ConfigSupport::durationConfigString).map(s -> "[" + s + "]").orElse("")) .append('(') .append(arg_.configString()) .append(')'); } RateExpression(TimeSeriesMetricExpression arg);  RateExpression(TimeSeriesMetricExpression arg, Duration interval);  RateExpression(TimeSeriesMetricExpression arg, Optional<Duration> interval); }
RateExpression implements TimeSeriesMetricExpression { @Override public StringBuilder configString() { return new StringBuilder() .append("rate") .append(interval_.map(ConfigSupport::durationConfigString).map(s -> "[" + s + "]").orElse("")) .append('(') .append(arg_.configString()) .append(')'); } 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 StringBuilder configString() { return new StringBuilder() .append("rate") .append(interval_.map(ConfigSupport::durationConfigString).map(s -> "[" + s + "]").orElse("")) .append('(') .append(arg_.configString()) .append(')'); } 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();  }