You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2020/02/15 10:13:19 UTC
[jmeter] branch master updated (8ae67ed -> 1a5e2e8)
This is an automated email from the ASF dual-hosted git repository.
pmouawad pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git.
from 8ae67ed Bug 64142 - Presence of DebugPostProcessor in Test plan breaks ActiveThread Over time in report due to missing information
new 6ce7fd7 JMeterThread: Factor our common code related to thread details
new 1a5e2e8 Strip empty line
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../java/org/apache/jmeter/threads/JMeterThread.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
[jmeter] 01/02: JMeterThread: Factor our common code related to
thread details
Posted by pm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit 6ce7fd700b64ef24c54f0f9f87c58324699fad9c
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sat Feb 15 11:12:11 2020 +0100
JMeterThread: Factor our common code related to thread details
---
.../org/apache/jmeter/threads/JMeterThread.java | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
index 0913268..1f3940e 100644
--- a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
+++ b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
@@ -526,6 +526,14 @@ public class JMeterThread implements Runnable, Interruptible {
return transactionResult;
}
+ private void fillThreadInformation(SampleResult result,
+ int nbActiveThreadsInThreadGroup,
+ int nbTotalActiveThreads) {
+ result.setGroupThreads(nbActiveThreadsInThreadGroup);
+ result.setAllThreads(nbTotalActiveThreads);
+ result.setThreadName(threadName);
+ }
+
/**
* Execute the sampler with its pre/post processors, timers, assertions
* Broadcast the result to the sample listeners
@@ -545,6 +553,7 @@ public class JMeterThread implements Runnable, Interruptible {
delay(pack.getTimers());
SampleResult result = null;
+
if (running) {
Sampler sampler = pack.getSampler();
result = doSampling(threadContext, sampler);
@@ -553,15 +562,11 @@ public class JMeterThread implements Runnable, Interruptible {
if (result != null && !result.isIgnore()) {
int nbActiveThreadsInThreadGroup = threadGroup.getNumberOfThreads();
int nbTotalActiveThreads = JMeterContextService.getNumberOfThreads();
- result.setGroupThreads(nbActiveThreadsInThreadGroup);
- result.setAllThreads(nbTotalActiveThreads);
- result.setThreadName(threadName);
+ fillThreadInformation(result, nbActiveThreadsInThreadGroup, nbTotalActiveThreads);
SampleResult[] subResults = result.getSubResults();
if (subResults != null) {
for (SampleResult subResult : subResults) {
- subResult.setGroupThreads(nbActiveThreadsInThreadGroup);
- subResult.setAllThreads(nbTotalActiveThreads);
- subResult.setThreadName(threadName);
+ fillThreadInformation(subResult, nbActiveThreadsInThreadGroup, nbTotalActiveThreads);
}
}
threadContext.setPreviousResult(result);
@@ -639,9 +644,7 @@ public class JMeterThread implements Runnable, Interruptible {
SamplePackage transactionPack, JMeterContext threadContext) {
// Get the transaction sample result
SampleResult transactionResult = transactionSampler.getTransactionResult();
- transactionResult.setThreadName(threadName);
- transactionResult.setGroupThreads(threadGroup.getNumberOfThreads());
- transactionResult.setAllThreads(JMeterContextService.getNumberOfThreads());
+ fillThreadInformation(transactionResult, threadGroup.getNumberOfThreads(), JMeterContextService.getNumberOfThreads());
// Check assertions for the transaction sample
checkAssertions(transactionPack.getAssertions(), transactionResult, threadContext);
[jmeter] 02/02: Strip empty line
Posted by pm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit 1a5e2e89b93473fcaa1de428a055ea2e5a33eaed
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sat Feb 15 11:12:55 2020 +0100
Strip empty line
---
src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
index 1f3940e..c43d199 100644
--- a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
+++ b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
@@ -553,7 +553,6 @@ public class JMeterThread implements Runnable, Interruptible {
delay(pack.getTimers());
SampleResult result = null;
-
if (running) {
Sampler sampler = pack.getSampler();
result = doSampling(threadContext, sampler);