diff --git a/README.md b/README.md index 6758ffe..5e694f9 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ Pay attention on "Sending metrics performance tuning" chapter, see below. The supported versions: * Java 11 - make sure that you have it (its minimum version). * InfluxDB v2.x, see release notes: https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/ (1.8 is not supported) -* JMeter 5.5.0 only. +* JMeter 5.6.2 only. -* The current board and plugin were tested on Grafana 9.1.6 and InfluxDB 2.2.0, JAVA 15. +* The current board and plugin were tested on Grafana 10.1.4 and InfluxDB 2.7.1, JAVA 15. ## Maven Support Please see the latest release here https://search.maven.org/artifact/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener. diff --git a/build.gradle b/build.gradle index 615175f..75e43bf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.johnrengelman.shadow' version "7.1.2" + id 'com.github.johnrengelman.shadow' version "8.1.1" id 'java' id 'java-library' id 'project-report' @@ -24,7 +24,7 @@ repositories { sourceCompatibility = 11 group = 'io.github.mderevyankoaqa' -version = '2.6' +version = '2.7' def title = 'JMeterInfluxDB2Listener' def archiveName = 'jmeter-plugins-influxdb2-listener' @@ -42,13 +42,14 @@ def archiveName = 'jmeter-plugins-influxdb2-listener' } dependencies { - implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_core', version: '5.5' - implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_java', version: '5.5' - implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_components', version: '5.5' - implementation group: 'org.apache.jmeter', name: 'jorphan', version: '5.5' - implementation group: 'com.influxdb', name: 'influxdb-client-java', version: '6.7.0' +// classpath "com.github.johnrengelman:shadow:8.1.1" + implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_core', version: '5.6.2' + implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_java', version: '5.6.2' + implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_components', version: '5.6.2' + implementation group: 'org.apache.jmeter', name: 'jorphan', version: '5.6.2' + implementation group: 'com.influxdb', name: 'influxdb-client-java', version: '6.10.0' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' - implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_http', version: '5.5' + implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_http', version: '5.6.2' components { withModule("org.apache.jmeter:ApacheJMeter_core", JMeterRule) withModule("org.apache.jmeter:ApacheJMeter_java", JMeterRule) @@ -137,11 +138,16 @@ publishing { name = 'Uladzislau Shklianik' email = 'Uladzislau_Shklianik@epam.com' } -i developer { + developer { id = 'MalshaUdani' name = 'Malsha Nagahawatta' email = 'malsha.nagahawatta@gmail.com' } + developer { + id = 'mateusgsan' + name = 'Mateus G. Santos' + email = 'mateusgsan@gmail.com' + } } scm { @@ -177,4 +183,4 @@ javadoc { if(JavaVersion.current().isJava9Compatible()) { options.addBooleanOption('html5', true) } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4549584..567a6dd 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Fri Apr 17 22:39:55 EEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/src/main/java/io/github/mderevyankoaqa/influxdb2/visualizer/result/SampleResultPointProvider.java b/src/main/java/io/github/mderevyankoaqa/influxdb2/visualizer/result/SampleResultPointProvider.java index e871aa9..2b6f951 100644 --- a/src/main/java/io/github/mderevyankoaqa/influxdb2/visualizer/result/SampleResultPointProvider.java +++ b/src/main/java/io/github/mderevyankoaqa/influxdb2/visualizer/result/SampleResultPointProvider.java @@ -44,11 +44,11 @@ public Point getPoint() { * @param isToBeSaved set to true if body need to be saved; otherwise false. * @return the normalized string if parameter @param isToBeSaved set to true; 'noData' string otherwise. */ - private String getErrorBodyToBeSaved(boolean isToBeSaved) + private String getErrorBodyToBeSaved(boolean isToBeSaved, boolean isSuccessful) { String errorResponseBody; - if (isToBeSaved) + if (isToBeSaved && isSuccessful) { errorResponseBody = this.getErrorBody(); } @@ -107,7 +107,7 @@ private Point getDefaultPoint() { .addTag(RequestMeasurement.Tags.RESULT_CODE, this.sampleResultContext.getSampleResult().getResponseCode()) .addTag(RequestMeasurement.Tags.ERROR_MSG, this.getAssertionFailure()) .addTag(RequestMeasurement.Tags.SAMPLE_TYPE, this.sampleResultContext.getSamplerType()) - .addTag(RequestMeasurement.Tags.ERROR_RESPONSE_BODY, this.getErrorBodyToBeSaved(this.sampleResultContext.isErrorBodyToBeSaved())) + .addTag(RequestMeasurement.Tags.ERROR_RESPONSE_BODY, this.getErrorBodyToBeSaved(this.sampleResultContext.isErrorBodyToBeSaved(), !this.sampleResultContext.getSampleResult().isSuccessful())) .addField(RequestMeasurement.Fields.ERROR_COUNT, this.sampleResultContext.getSampleResult().getErrorCount()) .addField(RequestMeasurement.Fields.REQUEST_COUNT, this.sampleResultContext.getSampleResult().getSampleCount()) .addField(RequestMeasurement.Fields.RECEIVED_BYTES, this.sampleResultContext.getSampleResult().getBytesAsLong())