From: markt Date: Thu, 18 Nov 2010 15:49:19 +0000 (+0000) Subject: Some additional statistics prompted by Remy's questions in the dev list X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0680fcdfb715aaedf1c138c96a4f6f5b4968826d;p=tomcat7.0 Some additional statistics prompted by Remy's questions in the dev list git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1036500 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/session/Benchmarks.java b/test/org/apache/catalina/session/Benchmarks.java index 191c12451..769805406 100644 --- a/test/org/apache/catalina/session/Benchmarks.java +++ b/test/org/apache/catalina/session/Benchmarks.java @@ -53,6 +53,9 @@ public class Benchmarks extends TestCase { doTestManagerBaseGenerateSessionId(4, 1000000); doTestManagerBaseGenerateSessionId(4, 1000000); doTestManagerBaseGenerateSessionId(16, 1000000); + // Reduce iterations as context switching will slow things down + doTestManagerBaseGenerateSessionId(100, 100000); + doTestManagerBaseGenerateSessionId(400, 10000); } @@ -92,8 +95,14 @@ public class Benchmarks extends TestCase { StringBuilder result = new StringBuilder(); result.append("Threads: "); result.append(threadCount); - result.append(", Time(ms): "); + result.append(", Time(ms): "); result.append(end-start); + result.append(", Digests: "); + result.append(mgr.digests.size()); + result.append(", Randoms: "); + result.append(mgr.randoms.size()); + result.append(", RandomInputStreams: "); + result.append(mgr.randomInputStreams.size()); System.out.println(result.toString()); } @@ -135,6 +144,9 @@ public class Benchmarks extends TestCase { doTestManagerBaseCreateSession(2, 1000000); doTestManagerBaseCreateSession(4, 1000000); doTestManagerBaseCreateSession(16, 1000000); + // Reduce iterations as context switching will slow things down + doTestManagerBaseCreateSession(100, 100000); + doTestManagerBaseCreateSession(400, 10000); } @@ -173,8 +185,14 @@ public class Benchmarks extends TestCase { StringBuilder result = new StringBuilder(); result.append("Threads: "); result.append(threadCount); - result.append(", Time(ms): "); + result.append(", Time(ms): "); result.append(end-start); + result.append(", Digests: "); + result.append(mgr.digests.size()); + result.append(", Randoms: "); + result.append(mgr.randoms.size()); + result.append(", RandomInputStreams: "); + result.append(mgr.randomInputStreams.size()); System.out.println(result.toString()); }