You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by ha...@apache.org on 2001/11/14 16:12:01 UTC
cvs commit: xml-rpc/src/test/org/apache/xmlrpc Benchmark.java
hannes 01/11/14 07:12:01
Modified: src/test/org/apache/xmlrpc Benchmark.java
Log:
Fixed bugs that caused displayed results to be incorrect.
Revision Changes Path
1.2 +7 -3 xml-rpc/src/test/org/apache/xmlrpc/Benchmark.java
Index: Benchmark.java
===================================================================
RCS file: /home/cvs/xml-rpc/src/test/org/apache/xmlrpc/Benchmark.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Benchmark.java 2001/07/20 19:38:20 1.1
+++ Benchmark.java 2001/11/14 15:12:01 1.2
@@ -58,7 +58,7 @@
import java.util.*;
import java.io.IOException;
-public class Benchmark
+public class Benchmark
implements Runnable
{
@@ -67,6 +67,8 @@
static int clients = 16;
static int loops = 100;
+ long start;
+
int gCalls = 0, gErrors = 0;
Date date;
@@ -83,8 +85,11 @@
client.execute ("math.abs", args);
date = new Date ();
date = new Date ((date.getTime() / 1000) * 1000);
+
+ start = System.currentTimeMillis ();
+ int nclients = clients;
- for (int i = 0; i < clients; i++)
+ for (int i = 0; i < nclients; i++)
new Thread (this).start ();
}
@@ -92,7 +97,6 @@
{
int errors = 0;
int calls = 0;
- long start = System.currentTimeMillis ();
try
{
int val = (int)(-100 * Math.random ());