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 2016/09/23 14:07:57 UTC

svn commit: r1762063 - /jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java

Author: pmouawad
Date: Fri Sep 23 14:07:57 2016
New Revision: 1762063

URL: http://svn.apache.org/viewvc?rev=1762063&view=rev
Log:
Bug 60090 Report / Dashboard : Empty Transaction Controller should not count in metrics
Bugzilla Id: 60090

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java?rev=1762063&r1=1762062&r2=1762063&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java Fri Sep 23 14:07:57 2016
@@ -18,6 +18,7 @@
 package org.apache.jmeter.report.processor.graph.impl;
 
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -66,12 +67,16 @@ public class ActiveThreadsGraphConsumer
 
                     @Override
                     public Iterable<String> select(Sample sample) {
-                        String threadName = sample.getThreadName();
-                        int index = threadName.lastIndexOf(" ");
-                        if (index >= 0) {
-                            threadName = threadName.substring(0, index);
+                        if(!sample.isEmptyController()) {
+                            String threadName = sample.getThreadName();
+                            int index = threadName.lastIndexOf(" ");
+                            if (index >= 0) {
+                                threadName = threadName.substring(0, index);
+                            }
+                            return Arrays.asList(new String[] { threadName });
+                        } else {
+                            return Collections.<String>emptyList();
                         }
-                        return Arrays.asList(new String[] { threadName });
                     }
                 }, new GraphValueSelector() {