Skip to content

Commit

Permalink
Merge pull request #84 from Blazemeter/RELEASE_v3.1
Browse files Browse the repository at this point in the history
Release v3.1
  • Loading branch information
Baraujo25 authored Oct 21, 2024
2 parents f438e62 + a301c9d commit 097805d
Show file tree
Hide file tree
Showing 37 changed files with 1,111 additions and 691 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.blazemeter</groupId>
<artifactId>jmeter-bzm-correlation-recorder</artifactId>
<packaging>jar</packaging>
<version>3.0</version>
<version>3.1</version>
<name>Auto Correlation Recorder</name>
<description>Auto Correlation Recorder as JMeter Plugin</description>
<url>https://github.com/Blazemeter/CorrelationRecorder</url>
Expand Down
14 changes: 14 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,19 @@
"json>=20190722",
"maven-artifact>=3.8.4"
]
},
{
"version": "3.1",
"what_is_new": "Many improvements in generation of suggestions from templates!",
"dependencies": [
"jackson-dataformat-xml>=2.10.3",
"jackson-annotations>=2.13.3",
"jackson-databind>=2.10.3",
"jackson-core>=2.13.3",
"jackson-module-jaxb-annotations>=2.10.3",
"jmeter-bzm-commons>=0.2.1",
"json>=20190722",
"maven-artifact>=3.8.4"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public synchronized void process(HTTPSamplerBase sampler, List<TestElement> chil
JMeterContextService.getContext().setVariables(vars);
// Using for instead of streams to avoid ConcurrentModificationException
for (CorrelationRule rule : rules) {
if (Thread.currentThread().isInterrupted()) {
break;
}
if (rule.isEnabled() && rule.getCorrelationReplacement() != null) {
try {
rule.getCorrelationReplacement().process(sampler, children, result, vars);
Expand All @@ -106,6 +109,9 @@ public synchronized void process(HTTPSamplerBase sampler, List<TestElement> chil
if (isContentTypeAllowed(result, responseFilter)) {
// Using for instead of streams to avoid ConcurrentModificationException
for (CorrelationRule rule : rules) {
if (Thread.currentThread().isInterrupted()) {
break;
}
if (rule.isEnabled() && rule.getCorrelationExtractor() != null) {
try {
rule.getCorrelationExtractor().process(sampler, children, result, vars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ public Map<Template, List<CorrelationSuggestion>> run(List<Template> selectedTem
setResultsSupplier(() -> JMeterElementUtils.getCurrentSampleResults(this.tracePath));

Map<Template, List<CorrelationSuggestion>> suggestions = new HashMap<>();
AnalysisReporter.startCollecting(); // Start collecting
for (Template template : selectedTemplates) {
AnalysisReporter.startCollecting();
startAnalysisWithGroupRules(template.getGroups());
AnalysisReporter.stopCollecting();
List<CorrelationSuggestion> correlationSuggestions =
AnalysisReporter.generateCorrelationSuggestions();
suggestions.put(template, correlationSuggestions);
AnalysisReporter.clear(); // Clear the current template suggestions
}
AnalysisReporter.stopCollecting();

enableCorrelation();
LOG.trace("Analysis finished!");
Expand Down Expand Up @@ -117,7 +118,7 @@ public void disableCorrelation() {
//With this method we will attempt to make the Analysis without triggering the recording
public void startAnalysisWithGroupRules(List<RulesGroup> rulesGroups) {
if (rulesGroups == null || rulesGroups.isEmpty()) {
LOG.error("No rules found. Using the default ones");
LOG.warn("No rules found. Using the default ones");
}

this.rulesGroups = rulesGroups;
Expand Down
Loading

0 comments on commit 097805d

Please sign in to comment.