Fixes issue #702.  Adds benchmarking capability to GWT as an extension to JUnit.

Patch by: tobyr
Review by: mmendez



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@813 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/doc/build.xml b/doc/build.xml
index d9015ca..74bc02b 100644
--- a/doc/build.xml
+++ b/doc/build.xml
@@ -9,7 +9,7 @@
 	<!-- Platform shouldn't matter here, just picking one -->
 	<property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
 
-	<property name="USER_PKGS" value="com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.typeinfo;com.google.gwt.i18n.client;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client" />
+	<property name="USER_PKGS" value="com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.typeinfo;com.google.gwt.i18n.client;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.junit.viewer.client" />
 	<property name="LANG_PKGS" value="java.lang;java.util" />
 	<property name="DOC_PKGS" value="com.google.gwt.doc" />
 
@@ -29,6 +29,7 @@
 		<pathelement location="${gwt.user.jar}" />
 		<pathelement location="${gwt.dev.jar}" />
 		<pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
+                <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
 	</path>
 
 	<!--
@@ -245,7 +246,7 @@
 					<arg value="-sourcepath" />
 					<arg pathref="USER_SOURCE_PATH" />
 					<arg value="-examplepackages" />
-					<arg value="com.google.gwt.examples;com.google.gwt.examples.i18n;com.google.gwt.examples.http.client;com.google.gwt.examples.rpc.server" />
+					<arg value="com.google.gwt.examples;com.google.gwt.examples.i18n;com.google.gwt.examples.http.client;com.google.gwt.examples.rpc.server;com.google.gwt.examples.benchmarks" />
 					<arg value="-packages" />
 					<arg value="${USER_PKGS}" />
 				</java>
diff --git a/doc/src/com/google/gwt/doc/DeveloperGuide.java b/doc/src/com/google/gwt/doc/DeveloperGuide.java
index 23bdc1d..51c4699 100644
--- a/doc/src/com/google/gwt/doc/DeveloperGuide.java
+++ b/doc/src/com/google/gwt/doc/DeveloperGuide.java
@@ -2229,6 +2229,34 @@
     public static class JUnitAsync {
     }
 
+    /**
+     * GWT's <a href="http://www.junit.org">JUnit</a> integration provides
+     * special support for creating and reporting on benchmarks. Specifically,
+     * GWT has introduced a new {@link com.google.gwt.junit.client.Benchmark}
+     * class which provides built-in facilities for common benchmarking needs.
+     *
+     * To take advantage of benchmarking support, take the following steps:
+     * <ol>
+     *   <li>Review the documentation on
+     * {@link com.google.gwt.junit.client.Benchmark}. Take a look at the
+     * example benchmark code.</li>
+     *   <li>Create your own benchmark by subclassing
+     * {@link com.google.gwt.junit.client.Benchmark}.
+     * Execute your benchmark like you would any normal JUnit test. By default,
+     * the test results are written to a report XML file in your working
+     * directory.</li>
+     *   <li>Run <code>benchmarkViewer</code> to browse visualizations
+     * (graphs/charts) of your report data. The <code>benchmarkViewer</code> is
+     * a GWT tool in the root of your GWT installation directory that displays
+     * benchmark reports.</li>
+     * </ol>
+     *
+     * @title Benchmarking
+     * @synopsis How to use GWT's JUnit support to create and report on
+     * benchmarks to help you optimize your code.
+     */
+    public static class JUnitBenchmarking {
+    }
   }
 
   /**