Author: sebb
Date: Fri May  1 00:31:28 2009
New Revision: 770499

URL: http://svn.apache.org/viewvc?rev=770499&view=rev
Log:
 Bug 47120 -  Throughput Controller: change percent executions to total 
executions, the value is stored in a String and interpreted as 1 execution

Modified:
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java?rev=770499&r1=770498&r2=770499&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ThroughputControllerGui.java
 Fri May  1 00:31:28 2009
@@ -78,7 +78,8 @@
             try {
                 ((ThroughputController) 
tc).setMaxThroughput(Integer.parseInt(throughput.getText().trim()));
             } catch (NumberFormatException e) {
-                ((ThroughputController) 
tc).setMaxThroughput(throughput.getText());
+                // In case we are converting back from floating point, drop 
the decimal fraction
+                ((ThroughputController) 
tc).setMaxThroughput((throughput.getText().trim().split("\\.")[0])); // 
$NON-NLS-1$
             }
         } else {
             try {
@@ -103,10 +104,10 @@
         super.configure(el);
         if (((ThroughputController) el).getStyle() == 
ThroughputController.BYNUMBER) {
             styleBox.getModel().setSelectedItem(BYNUMBER_LABEL);
-            throughput.setText(String.valueOf(((ThroughputController) 
el).getMaxThroughput()));
+            throughput.setText(((ThroughputController) el).getMaxThroughput());
         } else {
             styleBox.setSelectedItem(BYPERCENT_LABEL);
-            throughput.setText(String.valueOf(((ThroughputController) 
el).getPercentThroughput()));
+            throughput.setText(((ThroughputController) 
el).getPercentThroughput());
         }
         perthread.setSelected(((ThroughputController) el).isPerThread());
     }

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=770499&r1=770498&r2=770499&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Fri May  1 00:31:28 2009
@@ -207,6 +207,7 @@
 <li>Fix processing of Transaction Sampler parent mode so current sampler is 
set to actual sampler</li>
 <li>Fix processing of first file name in HTTP POST so functions/variables work 
(bug introduced with multiple file support)</li>
 <li>Bug 47127 -  Unable to change language to pl_PL</li>
+<li> Bug 47120 -  Throughput Controller: change percent executions to total 
executions, the value is stored in a String and interpreted as 1 execution</li>
 </ul>
 
 <h3>Improvements</h3>



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to