Skip to content

Commit 7fed1d5

Browse files
mderevyankoaqaMikhail.Derevyanko
andauthored
Error handling improvements (#50)
* New feature: added the possibility to manage response body length. Improved the results saving 1. Removed nulls - now the string "noData" instead of null to simplify the results sorting; null is not supported in the query - it seems :). 2. Added the "result" tag to filter the results quickly, can be "pass" or "fail". * Fixes after dev testing, updated the README.md, the dashboard. * Fixes after dev testing, updated the README.md, the dashboard. Co-authored-by: Mikhail.Derevyanko <[email protected]>
1 parent afac629 commit 7fed1d5

22 files changed

+4882
-2858
lines changed

README.md

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# JMeter InfluxDB v2.0 listener plugin
2-
<img src="https://badges.frapsoft.com/os/v3/open-source.svg?v=103" width="300">
2+
![](img/logo2.png) <img src="https://badges.frapsoft.com/os/v3/open-source.svg?v=103" width="500">
3+
34

45
<p align="left">
56
<img src="https://img.shields.io/github/license/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
67
<img src ="https://img.shields.io/github/v/release/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
78
<img src="https://img.shields.io/maven-central/v/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener?style=plastic">
9+
<img src="https://img.shields.io/github/downloads/mderevyankoaqa/jmeter-influxdb2-listener-plugin/total?style=plastic">
810
<img src="https://img.shields.io/github/stars/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=gold">
911
<img src="https://img.shields.io/github/forks/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic">
1012
<br>
@@ -55,7 +57,7 @@ The supported versions:
5557
* Java 11 - make sure that you have it (its minimum version).
5658
* InfluxDB v2.0, see release notes: https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/ (1.8 is not supported)
5759
* JMeter 5.4.3 only.
58-
* The current board and plugin were tested on Grafana 8.2.3 and InfluxDB 2.0.9, JAVA 15.
60+
* The current board and plugin were tested on Grafana 8.5.4 and InfluxDB 2.2.0, JAVA 15.
5961

6062
## Maven Support
6163
Please see the latest release here https://search.maven.org/artifact/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener.
@@ -94,36 +96,41 @@ While the first pull request please add your self to the [build.gradle](https://
9496

9597
Note: "fatJar" gradle task should be used to create the package for the JMeter.
9698

97-
![](img/deploy1.png)
99+
![](img/deploy1.png)
98100

99101
* Run JMeter and select the test plan, Add-> Listener -> Backend Listener.
100102

101-
![](img/deploy2.png)
103+
![](img/deploy2.png)
102104

105+
* Go to Backend Listener
106+
107+
![](img/testPlan.png)
108+
103109
* Select from the dropdown item with the name '`io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient`'.
104-
105-
![](img/deploy3.png)
110+
111+
![](img/deploy3.png)
106112

107113
## Upgrade
108114
* Close JMeter if its started.
109115
* Remove old jar.
110116
* Put '`jmeter-plugin-influxdb2-listener-<version>.jar`' file from [Releases](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/releases) to `~<JmeterPath<\lib\ext`;
111117
* Run JMeter again and got Listener.
112118
* Select from the dropdown item with the name '`io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient`'.
113-
![](img/deploy3.png)
119+
120+
![](img/deploy3.png)
121+
114122
* Click 'Clear all' button
115123

116-
![](img/deploy6.png)
124+
![](img/deploy6.png)
117125
* Set right settings (update all properties).
118126

119127
## InfluxDB configuration
120128
* Create Bucket to store the further testing results.
121129

122-
![](img/influx1.png)
130+
![](img/influx1.png)
123131

124132
* Create the token with read and write rights.
125-
126-
![](img/influx2.png)
133+
![](img/influx2.png)
127134

128135
## Plugin configuration
129136
Let’s explain the plugin fields:
@@ -134,32 +141,30 @@ Let’s explain the plugin fields:
134141
* `influxDBHost` - the host name or ip of the InfluxDB server.
135142
* `influxDBPort` - the port of the InfluxDB server, the default is 8086.
136143
* `influxDBToken` - the influxdb bucket token, the default value should be updated, copy it from InfluxDB site.
137-
* `influxDBFlushInterval` - its interval to send data to InfluxDB, the default value is 4000 (4 seconds).
138-
* `influxDBMaxBatchSize` - the max size of the batch with metrics, the default 2000 (2000 items of JMeter results).
139-
* `influxDBThresholdError` - the error threshold before stopping the import, the default value is 5. (see [Important notes](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/tree/main#important-notes) for more detail.)
140144

141-
![](img/influx3.png)
145+
![](img/influx3.png)
142146

143147
* `influxDBOrganization` - the influxdb bucket organization, the default value should be updated, copy it from InfluxDB site.
144148

145-
![](img/influx4.png)
146-
149+
![](img/influx4.png)
150+
151+
* `influxDBFlushInterval` - its interval to send data to InfluxDB, the default value is 4000 (4 seconds).
152+
* `influxDBMaxBatchSize` - the max size of the batch with metrics, the default 2000 (2000 items of JMeter results).
153+
* `influxDBThresholdError` - the error threshold before stopping the import, the default value is 5. (see [Important notes](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/tree/main#important-notes) for more detail.)
147154
* `influxDBBucket` - the InfluxDB bucket name to store the test results.
148155
* `samplersList` - the regex value to sort out the JMeter samplers results; the default is _`.*`_. For example if you have the pattern of JMeter test plan development like this - create the 'Transaction controller', add inside of the 'Transaction controller' the Sampler with request, and the name pattern '`GET->Something`', like on the see screen below.
149-
150-
![](img/testPlan.png)
151-
152156
The regex `^(Home Page|Login|Search)(-success|-failure)?$` can be used to save only samplers names. The regex can be generated from JMeter menu.
153157

154-
![](img/deploy4.png)
158+
![](img/deploy4.png)
155159

156160
You can modify the generated string in terms of your purposes.
157161

158-
![](img/deploy5.png)
162+
![](img/deploy5.png)
159163

160164
* `useRegexForSamplerList` - allows to use the regexps if set to 'true'.
161165
* `recordSubSamples` - allows to save the JMeter sub samples if set to 'true'.
162166
* `saveResponseBodyOfFailures` - allows to save the response body of the failures.
167+
* `responseBodyLength` - allows saving the response body, not more than the set specified length.
163168

164169
## Sending metrics performance tuning
165170
The plugin imports batch with JMeter results each 4 seconds (by default settings). In the logs you will see records like this:
@@ -178,32 +183,32 @@ See deployment instructions here https://grafana.com/grafana/dashboards/13644
178183

179184
Dashboard helps:
180185
* Monitor throughput with active users.
181-
182-
![](img/grafana1.png)
186+
![](img/grafana1.png)
183187

184-
* Overview and analise the response time, distribution as well.
185-
186-
![](img/grafana2.png)
187188

188-
![](img/grafana3.png)
189+
* Overview and analise the response time, distribution as well. Added the filters to see requests with status "pass", "fail".
190+
![](img/grafana2.png)
191+
![](img/grafana3.png)
189192

193+
190194
* See aggregate report.
191195
The table rendering may take an extra time. The table has hardware resources consuming queries from Influxdb side. If you have low hardware on the Influxdb server - recommended make the clone of the original dashboard and remove aggregate report.
192196
So the idea - it's to have one 'fast' dashboard for the online monitoring (has no aggregate report) to see the results while the test, the second (original with aggregate report) to see the final results.
197+
![](img/grafana4.0.png)
193198

194-
![](img/grafana4.png)
199+
Now added the possibility to see the aggregate report for requests with status "pass" only.
200+
![](img/grafana4.1.png)
195201

196-
* Investigate errors. The table is interactive, it's possible to filter data in the columns and see details for the specific error.
197202

198-
![](img/grafana5.png)
203+
* Investigate errors. The table is interactive, it's possible to filter data in the columns and see details for the specific error. Added the paging.
204+
![](img/grafana5.png)
199205

200-
* See network statistics, latency, processing time.
201-
202-
![](img/grafana6.png)
203-
204-
* Check individual request details.
205-
206-
![](img/grafana7.png)
207206

207+
* See network statistics, latency, processing time.
208+
![](img/grafana6.0.png)
209+
![](img/grafana6.1.png)
210+
![](img/grafana6.2.png)
208211

209212

213+
* Check individual request details.
214+
![](img/grafana7.png)

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repositories {
2424

2525
sourceCompatibility = 11
2626
group = 'io.github.mderevyankoaqa'
27-
version = '2.2'
27+
version = '2.3'
2828
def title = 'JMeterInfluxDB2Listener'
2929
def archiveName = 'jmeter-plugins-influxdb2-listener'
3030

0 commit comments

Comments
 (0)