jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1204153 - in /jmeter/trunk: src/components/org/apache/jmeter/visualizers/TableVisualizer.java xdocs/changes.xml
Date Sun, 20 Nov 2011 12:44:57 GMT
Author: pmouawad
Date: Sun Nov 20 12:44:57 2011
New Revision: 1204153

URL: http://svn.apache.org/viewvc?rev=1204153&view=rev
Log:
Bug 52216 - TableVisualizer : currentData field is badly synchronized

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
    jmeter/trunk/xdocs/changes.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=1204153&r1=1204152&r2=1204153&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java Sun Nov
20 12:44:57 2011
@@ -102,8 +102,6 @@ public class TableVisualizer extends Abs
 
     private transient Calculator calc = new Calculator();
 
-    private long currentData = 0;
-
     private Format format = new SimpleDateFormat("HH:mm:ss.SSS"); //$NON-NLS-1$
 
     // Column renderers
@@ -150,9 +148,9 @@ public class TableVisualizer extends Abs
         return "view_results_in_table"; // $NON-NLS-1$
     }
 
-    protected synchronized void updateTextFields() {
+    protected synchronized void updateTextFields(SampleResult res) {
         noSamplesField.setText(Long.toString(calc.getCount()));
-        dataField.setText(Long.toString(currentData));
+        dataField.setText(Long.toString(res.getTime()));
         averageField.setText(Long.toString((long) calc.getMean()));
         deviationField.setText(Long.toString((long) calc.getStandardDeviation()));
     }
@@ -167,16 +165,15 @@ public class TableVisualizer extends Abs
                 return;
             }
         }
-        currentData = res.getTime();
         synchronized (calc) {
-            calc.addValue(currentData);
+            calc.addValue(res.getTime());
             int count = calc.getCount();
             Sample newS = new Sample(res.getSampleLabel(), res.getTime(), 0, 0, 0, 0, 0,
0,
                     res.isSuccessful(), count, res.getEndTime(),res.getBytes(),
                     res.getThreadName());
             model.addRow(newS);
         }
-        updateTextFields();
+        updateTextFields(res);
         if (autoscroll.isSelected()) {
             table.scrollRectToVisible(table.getCellRect(table.getRowCount() - 1, 0, true));
         }
@@ -184,7 +181,6 @@ public class TableVisualizer extends Abs
 
     public synchronized void clearData() {
         model.clearData();
-        currentData = 0;
         calc.clear();
         noSamplesField.setText("0"); // $NON-NLS-1$
         dataField.setText("0"); // $NON-NLS-1$

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1204153&r1=1204152&r2=1204153&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Nov 20 12:44:57 2011
@@ -148,6 +148,7 @@ This behaviour can be changed with prope
 <li>Bug 52118 - New toolbar : shutdown and stop buttons not disabled when no test is
running</li>
 <li>Bug 52125 - StatCalculator.addAll(StatCalculator calc) joins incorrect if there
are more samples with the same response time in one of the TreeMap</li>
 <li>Bug 52215 - Confusing synchronization in StatVisualizer, SummaryReport ,Summariser
and issue in StatGraphVisualizer</li>
+<li>Bug 52216 - TableVisualizer : currentData field is badly synchronized</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message