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

Release v3.1 #84

Merged
merged 1 commit into from
Oct 21, 2024
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
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