Skip to content

Commit

Permalink
Added the "exclude" feature in the filters
Browse files Browse the repository at this point in the history
Version 2.7.0
  • Loading branch information
agauthier-nbc authored and anthonygauthier committed Jun 12, 2020
1 parent fecff50 commit 87cb99f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ JMeter ElasticSearch Backend Listener is a JMeter plugin enabling you to send te
* By making bulk requests, there are practically no impacts on the performance of the tests themselves.
* Filters
* Only send the samples you want by using Filters! Simply type them as follows in the field ``es.sample.filter`` : ``filter1;filter2;filter3`` or ``sampleLabel_must_contain_this``.
* You can also choose to exclude certain samplers; `!!exclude_this;filter1;filter2`
* Specific fields ```field1;field2;field3`
* Specify fields that you want to send to ElasticSearch (possible fields below)
* AllThreads
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.delirius325</groupId>
<artifactId>jmeter.backendlistener.elasticsearch</artifactId>
<version>2.6.11</version>
<version>2.7.0</version>
<packaging>jar</packaging>

<name>jmeter.backendlistener.elasticsearch</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private boolean validateSample(BackendListenerContext context, SampleResult sr)
Pattern pattern = Pattern.compile(filter);
Matcher matcher = pattern.matcher(sampleLabel);

if (sampleLabel.contains(filter) || matcher.find()) {
if (!sampleLabel.startsWith("!!") && (sampleLabel.contains(filter) || matcher.find())) {
valid = true;
break;
} else {
Expand Down

0 comments on commit 87cb99f

Please sign in to comment.