Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JMeter 5.6.2 and libs update, Bug fixes #90

Merged
merged 3 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
26 changes: 16 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'
Expand All @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -177,4 +183,4 @@ javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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())
Expand Down