286N/A-----------------------------------------------------------------------
286N/A-----------------------------------------------------------------------
286N/AJ2DBench is a suite of benchmarks with a GUI front end that lets you
286N/Aanalyze the performance of many Java2D graphical operations. You can
286N/Aeasily modify the test options, and save them for later runs using
286N/AGUI, or load them in batch mode to allow quick testing on different
286N/Abuilds. It also provides logging of the result, to make the
286N/Acomparison of the collected data easier.
286N/Acompare the results generated by the J2DBench runs.
286N/AXMLHTMLReporter is an additional tool which can create an html report
286N/Afrom the results files generated by the J2DBench runs.
286N/A-----------------------------------------------------------------------
286N/A-----------------------------------------------------------------------
286N/AThe benchmark requires at least jdk1.4 to compile and
286N/Aat least jdk1.2** to run.
286N/A** Note: the goal is to make the benchmark run on
1.1.x as well.
286N/A-----------------------------------------------------------------------
286N/A-----------------------------------------------------------------------
286N/AThe benchmark can be compiled by using either ant:
286N/Aor gnumake (assuming there's 'javac' in the path):
286N/ANote that the workspace also contains Netbeans 4.0 project file:
286N/Aallowing it to be easily imported into Netbeans.
286N/A-----------------------------------------------------------------------
286N/AHow To Run J2DBench, J2DAnalyzer, XMLHTMLReporter
286N/A-----------------------------------------------------------------------
To get help page for each of the tools, run:
-----------------------------------------------------------------------
Using J2DBench GUI to Create Options File
-----------------------------------------------------------------------
There are global options, options specific to a group of benchmarks,
and benchmark-specific options.
Global options affect all groups of benchmarks, group options only
affect benchmarks in particular group, and benchmark-specific ones are
relevant to a single benchmark.
Examples of important global options:
if the "Fixed Number of reps" is set to 0, J2DBench will calibrate
each individual benchmark, meaning that it will determine how many
repetitions each benchmark can perform in "Target Test Time", and
use this number of repetitions for each Test Run.
If "Fixed Number of reps" is non-0, each benchmark will be run for
specified number of repetitions. The use of Calibration mode is
preferable because the time per operation can vary widely among
where the benchmarks will render to.
All selected benchmarks will be repeated for each selected
Example of benchmark group options:
whether to use text antialiasing for text benchmarks
Example of a benchmark option:
Image Rendering Sources (for Imaging Benchmarks only):
the source image types used for testing
drawImage(Image image, AffineTransform tx, ImageObserver obs)
General note: you can chose multiple options in some cases by holding
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Suppose you want to compare rendering performance of the default
Start J2DBench (assuming the current dir is J2DBench's top dir)
You can either create and save the option file by selecting desired
tests and their attributes, or use one of the provided option files in
options/ directory (for example,
default.opt, which is used below).
Note that it's very easy to create an option file which would take an
extremely long time to execute the tests, so be be careful when
choosing the options and benchmarks to run.
After the options file is created, start J2DBench in batch mode to run
the benchmarks for the default pipeline:
-saveres
default.res -title "Rendering - Default ppl" \
-desc "Rendering tests with the default pipeline"
(You can also run selected tests directly from the GUI mode by hitting
"Run Tests" in the J2DBench dialog)
Now run the benchmark with opengl pipeline:
-desc "Rendering tests with OpenGL pipeline"
Now let's analyze the results using J2DAnalyzer:
Note that you can compare more than two sets of results, see
You can also generate html pages from the results files using
generated pages are to be stored in html_results directory.
Then generate the report:
The html report will be generated in html_results/ directory.