com.google.gwt.benchmarks

## Class BenchmarkReport

- java.lang.Object
- - com.google.gwt.benchmarks.BenchmarkReport

-     public class BenchmarkReport
      extends java.lang.Object

  Generates a detailed report that contains the results of all of the benchmark-related unit tests executed during a unit test session. The primary user of this class is `JUnitShell`. The report is in XML format. To view the XML reports, use benchmarkViewer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BenchmarkReport()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBenchmark(TreeLogger logger, JClassType benchmarkClass)` Adds the Benchmark to the report.
    `void` | `addBenchmarkResults(junit.framework.TestCase test, com.google.gwt.benchmarks.client.impl.BenchmarkResults results)`
    `void` | `generate(java.lang.String outputPath)` Generates reports for all of the benchmarks which were added to the generator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BenchmarkReport

          public BenchmarkReport()

  - ### Method Detail

    - #### addBenchmark

          public void addBenchmark(TreeLogger logger,
                          JClassType benchmarkClass)

      Adds the Benchmark to the report. All of the metadata about the benchmark (category, name, description, etc...) is recorded from the TypeOracle.
      Parameters:
        `logger` - to log the process
        `benchmarkClass` - The benchmark class to record. Must not be `null`.

    - #### addBenchmarkResults

          public void addBenchmarkResults(junit.framework.TestCase test,
                                 com.google.gwt.benchmarks.client.impl.BenchmarkResults results)

    - #### generate

          public void generate(java.lang.String outputPath)
                        throws javax.xml.parsers.ParserConfigurationException,
                               java.io.IOException

      Generates reports for all of the benchmarks which were added to the generator.
      Parameters:
        `outputPath` - The path to write the reports to.
      Throws:
        `javax.xml.parsers.ParserConfigurationException` - If an error occurs during xml parsing
        `java.io.IOException` - If anything goes wrong writing to outputPath