You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2020/08/17 15:30:24 UTC
[jmeter] branch bug_64553 updated: Method getSubResults constructs
new arrays, so call only once inside method
This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch bug_64553
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/bug_64553 by this push:
new 84cf510 Method getSubResults constructs new arrays, so call only once inside method
84cf510 is described below
commit 84cf510bc56f72bf777196e403a3e7451f141d60
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Mon Aug 17 17:29:59 2020 +0200
Method getSubResults constructs new arrays, so call only once inside method
---
.../java/org/apache/jmeter/visualizers/backend/SamplerMetric.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java b/src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java
index 33a3909..a279310 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java
@@ -159,11 +159,11 @@ public class SamplerMetric {
* @param isCumulated related to the overall sampler metric
*/
private void addHits(SampleResult result, boolean isCumulated) {
+ SampleResult[] subResults = result.getSubResults();
if (isCumulated && TransactionController.isFromTransactionController(result)
- && result.getSubResults().length == 0) { // Transaction controller without generate parent sampler
+ && subResults.length == 0) { // Transaction controller without generate parent sampler
return;
}
- SampleResult[] subResults = result.getSubResults();
if (!(TransactionController.isFromTransactionController(result) && subResults.length > 0)) {
hits += result.getSampleCount();
}