Skip to content

Commit cb10bc3

Browse files
mderevyankoaqaushklianikmateusgsanMikhail Derevyanko
authored
Support JMeter 5.6.2 and libs update, Bug fixes (#90)
* Added logic to save the error body only for failed requests (#81) - Added logic to save the error body only for failed requests * update dependencies to jmeter 5.6 (#88) - Updated the dependency to support the Jmeter 5.6 and influxdb-client-java 6.9.0 * Updated the versions of libs: JMeter 5.6.2 and influxdb-client-java 6.10.0; Gradle 8.4; com.github.johnrengelman.shadow 8.1.1 --------- Co-authored-by: ushklianik <[email protected]> Co-authored-by: Mateus Santos <[email protected]> Co-authored-by: Mikhail Derevyanko <[email protected]>
1 parent 97b2d1a commit cb10bc3

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Pay attention on "Sending metrics performance tuning" chapter, see below.
6666
The supported versions:
6767
* Java 11 - make sure that you have it (its minimum version).
6868
* InfluxDB v2.x, see release notes: https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/ (1.8 is not supported)
69-
* JMeter 5.5.0 only.
69+
* JMeter 5.6.2 only.
7070

71-
* The current board and plugin were tested on Grafana 9.1.6 and InfluxDB 2.2.0, JAVA 15.
71+
* The current board and plugin were tested on Grafana 10.1.4 and InfluxDB 2.7.1, JAVA 15.
7272

7373
## Maven Support
7474
Please see the latest release here https://search.maven.org/artifact/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener.

build.gradle

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'com.github.johnrengelman.shadow' version "7.1.2"
2+
id 'com.github.johnrengelman.shadow' version "8.1.1"
33
id 'java'
44
id 'java-library'
55
id 'project-report'
@@ -24,7 +24,7 @@ repositories {
2424

2525
sourceCompatibility = 11
2626
group = 'io.github.mderevyankoaqa'
27-
version = '2.6'
27+
version = '2.7'
2828

2929
def title = 'JMeterInfluxDB2Listener'
3030
def archiveName = 'jmeter-plugins-influxdb2-listener'
@@ -42,13 +42,14 @@ def archiveName = 'jmeter-plugins-influxdb2-listener'
4242
}
4343

4444
dependencies {
45-
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_core', version: '5.5'
46-
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_java', version: '5.5'
47-
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_components', version: '5.5'
48-
implementation group: 'org.apache.jmeter', name: 'jorphan', version: '5.5'
49-
implementation group: 'com.influxdb', name: 'influxdb-client-java', version: '6.7.0'
45+
// classpath "com.github.johnrengelman:shadow:8.1.1"
46+
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_core', version: '5.6.2'
47+
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_java', version: '5.6.2'
48+
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_components', version: '5.6.2'
49+
implementation group: 'org.apache.jmeter', name: 'jorphan', version: '5.6.2'
50+
implementation group: 'com.influxdb', name: 'influxdb-client-java', version: '6.10.0'
5051
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
51-
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_http', version: '5.5'
52+
implementation group: 'org.apache.jmeter', name: 'ApacheJMeter_http', version: '5.6.2'
5253
components {
5354
withModule("org.apache.jmeter:ApacheJMeter_core", JMeterRule)
5455
withModule("org.apache.jmeter:ApacheJMeter_java", JMeterRule)
@@ -137,11 +138,16 @@ publishing {
137138
name = 'Uladzislau Shklianik'
138139
139140
}
140-
i developer {
141+
developer {
141142
id = 'MalshaUdani'
142143
name = 'Malsha Nagahawatta'
143144
144145
}
146+
developer {
147+
id = 'mateusgsan'
148+
name = 'Mateus G. Santos'
149+
150+
}
145151

146152
}
147153
scm {
@@ -177,4 +183,4 @@ javadoc {
177183
if(JavaVersion.current().isJava9Compatible()) {
178184
options.addBooleanOption('html5', true)
179185
}
180-
}
186+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Fri Apr 17 22:39:55 EEST 2020
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
33
distributionBase=GRADLE_USER_HOME
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists

src/main/java/io/github/mderevyankoaqa/influxdb2/visualizer/result/SampleResultPointProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ public Point getPoint() {
4444
* @param isToBeSaved set to true if body need to be saved; otherwise false.
4545
* @return the normalized string if parameter @param isToBeSaved set to true; 'noData' string otherwise.
4646
*/
47-
private String getErrorBodyToBeSaved(boolean isToBeSaved)
47+
private String getErrorBodyToBeSaved(boolean isToBeSaved, boolean isSuccessful)
4848
{
4949
String errorResponseBody;
5050

51-
if (isToBeSaved)
51+
if (isToBeSaved && isSuccessful)
5252
{
5353
errorResponseBody = this.getErrorBody();
5454
}
@@ -107,7 +107,7 @@ private Point getDefaultPoint() {
107107
.addTag(RequestMeasurement.Tags.RESULT_CODE, this.sampleResultContext.getSampleResult().getResponseCode())
108108
.addTag(RequestMeasurement.Tags.ERROR_MSG, this.getAssertionFailure())
109109
.addTag(RequestMeasurement.Tags.SAMPLE_TYPE, this.sampleResultContext.getSamplerType())
110-
.addTag(RequestMeasurement.Tags.ERROR_RESPONSE_BODY, this.getErrorBodyToBeSaved(this.sampleResultContext.isErrorBodyToBeSaved()))
110+
.addTag(RequestMeasurement.Tags.ERROR_RESPONSE_BODY, this.getErrorBodyToBeSaved(this.sampleResultContext.isErrorBodyToBeSaved(), !this.sampleResultContext.getSampleResult().isSuccessful()))
111111
.addField(RequestMeasurement.Fields.ERROR_COUNT, this.sampleResultContext.getSampleResult().getErrorCount())
112112
.addField(RequestMeasurement.Fields.REQUEST_COUNT, this.sampleResultContext.getSampleResult().getSampleCount())
113113
.addField(RequestMeasurement.Fields.RECEIVED_BYTES, this.sampleResultContext.getSampleResult().getBytesAsLong())

0 commit comments

Comments
 (0)