Minor improvements
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Jun 2009 11:11:06 +0000 (11:11 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 19 Jun 2009 11:11:06 +0000 (11:11 +0000)
- as per Sebb's comment on the dev list - need to add a volatile
- correct the log message

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@786455 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/valves/Benchmarks.java

index 1b4d5d5..3a70039 100644 (file)
@@ -37,7 +37,7 @@ public class Benchmarks extends TestCase {
 
     private static class GetDateBenchmarkTest extends BenchmarkTest {
         private volatile long currentMillis = 0;
-        private Date currentDate = null;
+        private volatile Date currentDate = null;
 
         private ThreadLocal<Long> currentMillisLocal = new ThreadLocal<Long>() {
             protected Long initialValue() {
@@ -227,7 +227,7 @@ public class Benchmarks extends TestCase {
             }
             long end = System.currentTimeMillis();
             
-            System.out.println("testAccessLogGetDate: " + threadCount +
+            System.out.println(this.getClass().getName() + ": " + threadCount +
                     " threads and " + iterations + " iterations " +
                     (useSyncs?"using Syncs":"using ThreadLocals") +
                     " took " + (end-start) + "ms");