glenn 2003/12/10 19:41:37
Modified: tbm build.xml
tbm/src/xsl bench.xsl
tbm/xdocs index.xml tbm.xml
tbm/src/bench/org/apache/commons/tbm/bench BenchTask.java
BenchTest.java
Added: tbm/xdocs todo.xml
Log:
Add a todo list.
Gather information on JVM startup options used for test.
Increase warmup tests to 512K.
Revision Changes Path
1.3 +2 -2 jakarta-commons-sandbox/tbm/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/tbm/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 10 Dec 2003 03:12:36 -0000 1.2
+++ build.xml 11 Dec 2003 03:41:37 -0000 1.3
@@ -423,7 +423,7 @@
<classpath location="${commons-lang.jar}"/>
</taskdef>
<mkdir dir="${dest.bench}"/>
- <bench file="${dest.bench}/${bench.file}.xml" system="${bench.system}">
+ <bench file="${dest.bench}/${bench.file}.xml" system="${bench.system}"
options="${bench.options}">
<test classname="org.apache.commons.tbm.bench.BenchNOP"/>
<test classname="org.apache.commons.tbm.bench.datetime.DefaultTimeZone"/>
<test classname="org.apache.commons.tbm.bench.datetime.SimpleDateFormat"/>
1.2 +1 -0 jakarta-commons-sandbox/tbm/src/xsl/bench.xsl
Index: bench.xsl
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/tbm/src/xsl/bench.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bench.xsl 9 Dec 2003 15:54:11 -0000 1.1
+++ bench.xsl 11 Dec 2003 03:41:37 -0000 1.2
@@ -21,6 +21,7 @@
</center>
<p>
JVM: <xsl:value-of select="java/@vendor"/>  <xsl:value-of
select="java/@version"/><br />
+ JVM Startup Options: <xsl:value-of select="java/@options"/><br />
OS: <xsl:value-of select="os/@name"/>  <xsl:value-of
select="os/@version"/>  <xsl:value-of select="os/@arch"/><br />
</p>
<xsl:apply-templates select="test"/>
1.2 +1 -0 jakarta-commons-sandbox/tbm/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/tbm/xdocs/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 9 Dec 2003 15:54:11 -0000 1.1
+++ index.xml 11 Dec 2003 03:41:37 -0000 1.2
@@ -60,6 +60,7 @@
<li><a href="bottlenecks.html">Thread Synchronization Bottlenecks</a></li>
<li><a href="results.html">Results of TBM tests on various platforms</a></li>
<li><a href="api/index.html">API Documentation</a></li>
+ <li><a href="todo.html">List of TODO items for TBM</a></li>
</ul>
</p>
1.2 +4 -3 jakarta-commons-sandbox/tbm/xdocs/tbm.xml
Index: tbm.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/tbm/xdocs/tbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tbm.xml 9 Dec 2003 15:54:11 -0000 1.1
+++ tbm.xml 11 Dec 2003 03:41:37 -0000 1.2
@@ -29,7 +29,8 @@
Defaults to the directory <code>bench</code>.</li>
<li><code>bench.file</code> - Benchmark results are placed in an XML file with this
name
in the <code>dest.bench</code> directory. Default file name is
<code>bench</code>.</li>
-<li><code>bench.system</code> - Information about test system used to label the
test results. Put things like OS and number of CPU's in this text string.</li>
+<li><code>bench.system</code> - Information about test system used to label the
test results. Put things like OS and number of CPU's in this text string.
(Required)</li>
+<li><code>bench.options</code> - The JVM options used when running tests,
<code>$ANT_OPTS</code>. (Required)</li>
</ul>
When the benchmark tests have been completed you will end up with two files in your
<code>dest.bench</code> directory. An XML file with the test results named
@@ -37,7 +38,7 @@
<p>Here is an example command line for executing the benchmark tests:
<pre>
-ant -Dbench.file="test1" -Dbench.system="Sun E250 Dual CPU" bench
+ant -Dbench.file="test1" -Dbench.system="Sun E250 Dual CPU"
-Dbench.options="$ANT_OPTS" bench
</pre>
</p>
</section>
@@ -46,7 +47,7 @@
<p>Here is how a single benchmark test is performed.</p>
-<p>First a warmup is done. 10,000 iterations of the test are performed to
+<p>First a warmup is done. 512K iterations of the test are performed to
give the JVM HotSpot Profiler/Optimizer an opportunity to optimize the
java code before performing the actual benchmark test.</p>
1.1 jakarta-commons-sandbox/tbm/xdocs/todo.xml
Index: todo.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Thread Benchmark (TBM) - List of things TODO</title>
<author email="[EMAIL PROTECTED]">Commons Documentation Team</author>
</properties>
<body>
<section name="TODO">
<p>Here is a growing list of items TODO for the Thread Benchmark component.</p>
<subsection name="Collections Benchmarks">
<p>Create a package named <code>org.apache.commons.tbm.bench.collections</code>
where benchmark tests can be created for different java collection types such
as the native JVM ones such as array, those in java.util, and those in
Jakarta commons-collections.</p>
</subsection>
<subsection name="Pool Benchmarks">
<p>Create a package named <code>org.apache.commons.tbm.bench.pool</code>
where benchmark tests can be created for different implements for pooling
objects such as those found in Jakarta commons-pool.</p>
</subsection>
<subsection name="JDBC Benchmarks">
<p>Create a package named <code>org.apache.commons.tbm.bench.jdbc</code>
where benchmark test can be create for testing different JDBC driver
implemenations for the java.sql.Date, java.sql.Time, and java.sql.Timestamp
thread synchronization bottlenecks.</p>
</subsection>
<subsection name="Benchmark test result graphs">
<p>Add the ability to generate graphs for benchmark test results.</p>
</subsection>
<subsection name="Realworld benchmark tests">
<p>Benchmark tests written with the minimal code to trigger
a thread synchronization bottleneck may not reflect real world
problems with thread synchronization. While a thread is waiting
to gain access to the synchronization lock it could be doing other
work. Develop benchmark tests which do more work so that the test
results reflect the real world better.</p>
</subsection>
<subsection name="Better Documentation">
<p>Improve the documentation:
<ul>
<li>Add section on how to interpret results.</li>
<li>Add section on tips, tricks, and gotchas for performing benchmarks.</li>
<li>Better documenation for existing datetime benchmark tests.</li>
<li>Add section on how to develop your own benchmark tests.</li>
</ul>
</p>
</subsection>
<subsection name="Improve quality of memory used and GC times">
<p>Improve the quality of the data collected for total memory used
and total garbage collection times. This may require using the
JVM option <code>-verbose:gc</code>, capturing the output, and post
processing it.</p>
</subsection>
</section>
</body>
</document>
1.2 +28 -4
jakarta-commons-sandbox/tbm/src/bench/org/apache/commons/tbm/bench/BenchTask.java
Index: BenchTask.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/tbm/src/bench/org/apache/commons/tbm/bench/BenchTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BenchTask.java 9 Dec 2003 15:54:11 -0000 1.1
+++ BenchTask.java 11 Dec 2003 03:41:37 -0000 1.2
@@ -85,6 +85,8 @@
private File data = null;
// Description of system tests are being performed on
private String system = null;
+ // Options used for starting JVM
+ private String options = null;
/**
* Add a java class which implements a benchmark test.
@@ -99,6 +101,17 @@
* Execute a benchmark test.
*/
public void execute() throws BuildException {
+ // Make sure there is a system string
+ if (system == null || system.length() == 0) {
+ throw new BuildException(
+ "You must specify the bench.system property when starting ant");
+ }
+ // Make sure there is a options string
+ if (options == null || options.length() == 0) {
+ throw new BuildException(
+ "You must specify the bench.options property when starting ant");
+ }
+
// Do some sanity checks on output file
if (data == null) {
throw new BuildException(
@@ -142,6 +155,15 @@
}
/**
+ * JVM Options used when running ant.
+ *
+ * The options used for the JVM can impact the test results.
+ */
+ public void setOptions(String options) {
+ this.options = options;
+ }
+
+ /**
* File to output generated benchmark xml data to.
*
* @param data File to output generated benchmark xml data to
@@ -162,6 +184,8 @@
sb.append(System.getProperty("java.vendor"));
sb.append("\" version=\"");
sb.append(System.getProperty("java.version"));
+ sb.append("\" options=\"");
+ sb.append(options);
sb.append("\"/>\n <os arch=\"");
sb.append(System.getProperty("os.arch"));
sb.append("\" name=\"");
1.3 +5 -5
jakarta-commons-sandbox/tbm/src/bench/org/apache/commons/tbm/bench/BenchTest.java
Index: BenchTest.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/tbm/src/bench/org/apache/commons/tbm/bench/BenchTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BenchTest.java 10 Dec 2003 16:20:02 -0000 1.2
+++ BenchTest.java 11 Dec 2003 03:41:37 -0000 1.3
@@ -149,7 +149,7 @@
error = e.getMessage();
return false;
}
- warmup.setIterations(iterations);
+ warmup.setIterations(iterations*2);
warmup.start();
try {
warmup.join();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]