sebb 2004/10/23 18:03:46
Modified: src/components/org/apache/jmeter/control Tag: rel-2_0
ThroughputController.java
Log:
Simplify to use int instead of IntegerWrapper
Revision Changes Path
No revision
No revision
1.15.2.1 +10 -33
jakarta-jmeter/src/components/org/apache/jmeter/control/ThroughputController.java
Index: ThroughputController.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/control/ThroughputController.java,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -r1.15 -r1.15.2.1
--- ThroughputController.java 13 Feb 2004 01:31:55 -0000 1.15
+++ ThroughputController.java 24 Oct 2004 01:03:46 -0000 1.15.2.1
@@ -58,8 +58,8 @@
private static final String PERCENTTHROUGHPUT =
"ThroughputController.percentThroughput";
- private IntegerWrapper globalNumExecutions;
- private IntegerWrapper globalIteration;
+ private int globalNumExecutions;
+ private int globalIteration;
private transient Object counterLock;
/**
@@ -79,8 +79,8 @@
public ThroughputController()
{
- globalNumExecutions = new IntegerWrapper(new Integer(0));
- globalIteration = new IntegerWrapper(new Integer(-1));
+ globalNumExecutions = 0;
+ globalIteration = -1;
counterLock = new Object();
setStyle(BYNUMBER);
setPerThread(true);
@@ -185,7 +185,7 @@
{
if (!isPerThread())
{
- globalNumExecutions.setInteger(new Integer(executions));
+ globalNumExecutions=executions;
}
this.numExecutions = executions;
}
@@ -194,7 +194,7 @@
{
if (!isPerThread())
{
- return globalNumExecutions.getInteger().intValue();
+ return globalNumExecutions;
}
else
{
@@ -211,7 +211,7 @@
{
if (!isPerThread())
{
- globalIteration.setInteger(new Integer(iteration));
+ globalIteration=iteration;
}
this.iteration = iteration;
}
@@ -220,7 +220,7 @@
{
if (!isPerThread())
{
- return globalIteration.getInteger().intValue();
+ return globalIteration;
}
else
{
@@ -370,29 +370,6 @@
{
}
- protected class IntegerWrapper implements Serializable
- {
- Integer i;
-
- public IntegerWrapper()
- {
- }
-
- public IntegerWrapper(Integer i)
- {
- this.i = i;
- }
-
- public void setInteger(Integer i)
- {
- this.i = i;
- }
-
- public Integer getInteger()
- {
- return i;
- }
- }
/////////////////////////// Start of Test Code ///////////////////////////
public static class Test extends JMeterTestCase
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]