diff --git a/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/listeners/InfluxDbBackendListener.java b/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/listeners/InfluxDbBackendListener.java index c5610758..f98ebffe 100644 --- a/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/listeners/InfluxDbBackendListener.java +++ b/jmeter-java-dsl/src/main/java/us/abstracta/jmeter/javadsl/core/listeners/InfluxDbBackendListener.java @@ -1,5 +1,8 @@ package us.abstracta.jmeter.javadsl.core.listeners; +import static java.util.stream.Collectors.joining; +import static java.util.stream.IntStream.range; + import java.lang.reflect.Method; import java.time.Instant; import java.util.HashMap; @@ -24,6 +27,7 @@ public class InfluxDbBackendListener extends DslBackendListener Float.toString(percentiles[i])) + .collect(joining(";")); + return this; + } + @Override protected Arguments buildListenerArguments() { Arguments ret = new Arguments(); @@ -143,6 +161,9 @@ protected Arguments buildListenerArguments() { if (samplersRegex != null) { ret.addArgument(SAMPLERS_REGEX_ARG, samplersRegex); } + if (percentiles != null) { + ret.addArgument(PCT_ARG, percentiles); + } tags.forEach((name, value) -> ret.addArgument(TAG_ARGS_PREFIX + name, value)); return ret; } @@ -160,7 +181,8 @@ protected MethodCall buildBackendListenerCall(Map args, .chain("title", buildArgParam(TITLE_ARG, args, defaultValues)) .chain("application", buildArgParam(APPLICATION_ARG, args, defaultValues)) .chain("measurement", buildArgParam(MEASUREMENT_ARG, args, defaultValues)) - .chain("samplersRegex", buildArgParam(SAMPLERS_REGEX_ARG, args, defaultValues)); + .chain("samplersRegex", buildArgParam(SAMPLERS_REGEX_ARG, args, defaultValues)) + .chain("percentiles", buildArgParam(PCT_ARG, args, defaultValues)); args.entrySet().stream() .filter(e -> e.getKey().startsWith(TAG_ARGS_PREFIX)) .forEach(