[jboss-cvs] JBossAS SVN: r68607 - projects/cluster/varia/sessionstress.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 3 14:52:01 EST 2008
Author: bela at jboss.com
Date: 2008-01-03 14:52:01 -0500 (Thu, 03 Jan 2008)
New Revision: 68607
Modified:
projects/cluster/varia/sessionstress/PerfTest.java
Log:
removed barrier to start
Modified: projects/cluster/varia/sessionstress/PerfTest.java
===================================================================
--- projects/cluster/varia/sessionstress/PerfTest.java 2008-01-03 19:29:18 UTC (rev 68606)
+++ projects/cluster/varia/sessionstress/PerfTest.java 2008-01-03 19:52:01 UTC (rev 68607)
@@ -33,6 +33,7 @@
private void start(String host, String setup_url, String read_url, String write_url, int num_threads, int num_requests, int num_attrs, int size, int write_percentage) throws NamingException, BrokenBarrierException, InterruptedException {
this.clients=new Client[num_threads];
this.barrier=new CyclicBarrier(num_threads + 1);
+ System.out.println("Starting " + num_threads + " clients");
for(int i=0; i < clients.length; i++) {
Client client=new Client(barrier, host, setup_url, read_url, write_url, write_percentage,
num_requests, num_attrs, size);
@@ -40,10 +41,6 @@
client.start();
}
- System.out.println("Starting " + num_threads + " clients");
- barrier.await(); // all threads should start (after initialization)
-
-
System.out.println("Waiting for clients to complete");
barrier.await();
@@ -187,14 +184,8 @@
public void run() {
try {
+ init(num_attrs, size);
start=System.currentTimeMillis();
- try {
- init(num_attrs, size);
- log("barrier.await()");
- }
- finally {
- barrier.await();
- }
loop(num_requests);
}
catch(Exception e) {
@@ -204,7 +195,7 @@
finally {
stop=System.currentTimeMillis();
log("barrier.await()");
- try {barrier.await(5000, TimeUnit.MILLISECONDS);} catch(Exception e) {}
+ try {barrier.await(60000, TimeUnit.MILLISECONDS);} catch(Exception e) {}
setup_method.releaseConnection();
}
}
More information about the jboss-cvs-commits
mailing list