jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1202966 - in /jmeter/trunk: src/components/org/apache/jmeter/visualizers/TableVisualizer.java src/core/org/apache/jmeter/resources/messages.properties xdocs/changes.xml xdocs/usermanual/component_reference.xml
Date Thu, 17 Nov 2011 01:20:00 GMT
Author: sebb
Date: Thu Nov 17 01:20:00 2011
New Revision: 1202966

URL: http://svn.apache.org/viewvc?rev=1202966&view=rev
Log:
Bug 52201 - Add option to TableVisualiser to display child samples instead of parent 

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java?rev=1202966&r1=1202965&r2=1202966&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java Thu Nov
17 01:20:00 2011
@@ -37,6 +37,7 @@ import javax.swing.border.EmptyBorder;
 import javax.swing.table.TableCellRenderer;
 
 import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer;
+import org.apache.jmeter.gui.util.HorizontalPanel;
 import org.apache.jmeter.samplers.Clearable;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.util.Calculator;
@@ -97,6 +98,8 @@ public class TableVisualizer extends Abs
 
     private JCheckBox autoscroll = null;
 
+    private JCheckBox childSamples = null;
+
     private transient Calculator calc = new Calculator();
 
     private long currentData = 0;
@@ -155,6 +158,15 @@ public class TableVisualizer extends Abs
     }
 
     public void add(SampleResult res) {
+        if (childSamples.isSelected()) {
+            SampleResult[] subResults = res.getSubResults();
+            if (subResults.length > 0) {
+                for (SampleResult sr : subResults) {
+                    add(sr);
+                }
+                return;
+            }
+        }
         currentData = res.getTime();
         synchronized (calc) {
             calc.addValue(currentData);
@@ -210,6 +222,8 @@ public class TableVisualizer extends Abs
 
         autoscroll = new JCheckBox(JMeterUtils.getResString("view_results_autoscroll"));
//$NON-NLS-1$
 
+        childSamples = new JCheckBox(JMeterUtils.getResString("view_results_childsamples"));
//$NON-NLS-1$
+
         // Set up footer of table which displays numerics of the graphs
         JPanel dataPanel = new JPanel();
         JLabel dataLabel = new JLabel(JMeterUtils.getResString("graph_results_latest_sample"));
// $NON-NLS-1$
@@ -247,7 +261,7 @@ public class TableVisualizer extends Abs
         JPanel noSamplesPanel = new JPanel();
         JLabel noSamplesLabel = new JLabel(JMeterUtils.getResString("graph_results_no_samples"));
// $NON-NLS-1$
 
-        noSamplesField = new JTextField(10);
+        noSamplesField = new JTextField(8);
         noSamplesField.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         noSamplesField.setEditable(false);
         noSamplesField.setForeground(Color.black);
@@ -266,7 +280,10 @@ public class TableVisualizer extends Abs
 
         JPanel tableControlsPanel = new JPanel(new BorderLayout());
         tableControlsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
-        tableControlsPanel.add(autoscroll, BorderLayout.WEST);
+        JPanel jp = new HorizontalPanel();
+        jp.add(autoscroll);
+        jp.add(childSamples);
+        tableControlsPanel.add(jp, BorderLayout.WEST);
         tableControlsPanel.add(tableInfoPanel, BorderLayout.CENTER);
 
         // Set up the table with footer

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1202966&r1=1202965&r2=1202966&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Thu Nov 17 01:20:00
2011
@@ -996,6 +996,7 @@ view_results_assertion_error=Assertion e
 view_results_assertion_failure=Assertion failure: 
 view_results_assertion_failure_message=Assertion failure message: 
 view_results_autoscroll=Scroll automatically?
+view_results_childsamples=Child samples?
 view_results_desc=Shows the text results of sampling in tree form
 view_results_error_count=Error Count: 
 view_results_fields=fields:

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1202966&r1=1202965&r2=1202966&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Nov 17 01:20:00 2011
@@ -175,6 +175,7 @@ This behaviour can be changed with prope
 <h3>Listeners</h3>
 <ul>
 <li>Bug 52022 - In View Results Tree rather than showing just a message if the results
are to big, show as much of the result as are configured</li>
+<li>Bug 52201 - Add option to TableVisualiser to display child samples instead of parent
</li>
 </ul>
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1202966&r1=1202965&r2=1202966&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Thu Nov 17 01:20:00 2011
@@ -2544,6 +2544,11 @@ i.e. 30.0 requests/minute is saved as 0.
 <component name="View Results in Table" index="&sect-num;.3.8"  width="658" height="700"
screenshot="table_results.png">
 <description>This visualizer creates a row for every sample result.  
 Like the <complink name="View Results Tree"/>, this visualizer uses a lot of memory.
+<p>
+By default, it only displays the main (parent) samples; it does not display the sub-samples
(child samples).
+Versions of JMeter after 2.5.1 have a "Child Samples?" check-box.
+If this is selected, then the sub-samples are displayed instead of the main samples.  
+</p>
 </description>
 </component>
 



Mime
View raw message