You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2005/04/03 01:46:15 UTC
cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/visualizers SamplingStatCalculator.java
sebb 2005/04/02 15:46:15
Modified: src/components/org/apache/jmeter/timers ConstantTimer.java
src/core/org/apache/jmeter/threads/gui ThreadGroupGui.java
src/core/org/apache/jmeter/visualizers
SamplingStatCalculator.java
Log:
Remove some unnecessary casts
Revision Changes Path
1.18 +3 -3 jakarta-jmeter/src/components/org/apache/jmeter/timers/ConstantTimer.java
Index: ConstantTimer.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/timers/ConstantTimer.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ConstantTimer.java 13 Feb 2004 03:46:14 -0000 1.17
+++ ConstantTimer.java 2 Apr 2005 23:46:15 -0000 1.18
@@ -82,7 +82,7 @@
*/
public double getRange()
{
- return (double) 0;
+ return 0;
}
/**
1.28 +4 -4 jakarta-jmeter/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
Index: ThreadGroupGui.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ThreadGroupGui.java 18 Mar 2005 15:26:56 -0000 1.27
+++ ThreadGroupGui.java 2 Apr 2005 23:46:15 -0000 1.28
@@ -117,11 +117,11 @@
tg.setProperty(
new LongProperty(
ThreadGroup.START_TIME,
- ((Date) start.getDate()).getTime()));
+ start.getDate().getTime()));
tg.setProperty(
new LongProperty(
ThreadGroup.END_TIME,
- ((Date) end.getDate()).getTime()));
+ end.getDate().getTime()));
tg.setProperty(
new BooleanProperty(ThreadGroup.SCHEDULER, scheduler.isSelected()));
tg.setProperty(
1.5 +7 -7 jakarta-jmeter/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java
Index: SamplingStatCalculator.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/visualizers/SamplingStatCalculator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SamplingStatCalculator.java 28 Oct 2004 23:41:43 -0000 1.4
+++ SamplingStatCalculator.java 2 Apr 2005 23:46:15 -0000 1.5
@@ -184,7 +184,7 @@
{
double rate = 0;
if (this.getElapsed() > 0 && calculator.getTotalBytes() > 0){
- rate = (double)calculator.getTotalBytes()/
+ rate = calculator.getTotalBytes()/
((double)this.getElapsed()/1000);
}
if (rate < 0){
@@ -220,15 +220,15 @@
// in case the sampler doesn't return the contents
// we see if the bytes was set
if (res.getResponseData() == null || res.getResponseData().length == 0){
- byteslength = (long)res.getBytes();
+ byteslength = res.getBytes();
} else {
- byteslength = (long)res.getResponseData().length;
+ byteslength = res.getResponseData().length;
}
// if there was more than 1 loop in the sample, we
// handle it appropriately
if (res.getSampleCount() > 1){
long time = res.getTime() / res.getSampleCount();
- long resbytes = byteslength/(long)res.getSampleCount();
+ long resbytes = byteslength / res.getSampleCount();
for (int idx=0; idx < res.getSampleCount(); idx++){
calculator.addValue(time);
calculator.addBytes(resbytes);
@@ -250,7 +250,7 @@
{
throughput = Double.MAX_VALUE;
}
- throughput = (double) ((double)calculator.getCount() / (double)howLongRunning) * 1000.0;
+ throughput = ((double)calculator.getCount() / (double)howLongRunning) * 1000.0;
if(throughput > maxThroughput)
{
maxThroughput = throughput;
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org