On Fri, Jul 11, 2003 at 10:10:21AM -0700, James Courtney wrote:
> I didn't see an attachment that time. Thanks as this is interesting
> stuff for Java development of any kind, not just Tomcat!
Stupid me. Is attached now.
-Dave
import java.sql.*;
import java.util.*;
public class TestDatePerf
extends Thread
{
int iterations;
Timestamp date = null;
public TestDatePerf(int iterations) {
this.iterations = iterations;
date = new Timestamp(System.currentTimeMillis());
}
public void run() {
for (int i = 0; i < iterations; i++) {
date.toString();
}
}
public static void main(String args[]) {
int threads = Integer.parseInt(args[0]);
int iterations = Integer.parseInt(args[1]);
for (int i = 0; i < threads; i++) {
TestDatePerf tdp = new TestDatePerf((int)iterations/threads);
tdp.start();
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]