In JProfiler, you can save profiling data to disk,
To compare one or several of these snapshots, JProfiler offers a separate comparison window that you can access by
Menu and toolbar of the snapshot window are focused on snapshot comparisons, you can access all other parts of JProfiler from a snapshot window by choosing File->Show Start Center from the main menu or clicking on the corresponding toolbar button. This can be necessary if you close all other windows. File->New Window opens a new JProfiler window with the start center displayed. |
Note: It is possible to create and export comparisons from the command line or an ant build file. This is especially useful for an automated quality assurance process. |
The snapshot window contains a snapshot selector at the left side that lets you configure the
snapshots which are available for creating a comparison. Before you create a comparison, you have to add
the involved snapshots to the snapshot selector. If you open the snapshot comparison window without
having saved any snapshots during the current JProfiler session, you will be prompted to select snapshot files.
The order of the snapshot files in the list is significant since all comparisons will assume that snapshots further down in the list have been recorded later. Note: Snapshots are always compared to other snapshots, if you wish to compare a snapshot to a currently running profiling session, please save a snapshot first. The saved snapshot will automatically be shown in the snapshot selector. The snapshot selector offers the following operations as toolbar buttons and context menu items:
|
After you've added the involved snapshots, you can create comparisons with the comparison wizards.
There are several comparison wizards that group comparisons in analogy to the view sections
in the profiling window:
If you wish to perform the comparison on a subset of the displayed snapshot files, it is easiest to first select the involved snapshots before invoking a comparison wizard. However, all snapshot wizards allow you to change this selection. |
Comparisons are displayed as new tabs in the snapshot comparison window. They can be
|
The comparison wizards are optimized to quickly let you create new comparisons that are similar to previous
comparisons. The wizards remember all previous parameters, so to create another comparison with the same parameters
but different snapshots, just select new new snapshots in the snapshot selector on the left, invoke the
wizard and click on "Finish".
To create another comparison with the same snapshots but different parameters, just invoke the wizard, click on "Next" to confirm the comparison type, then click on the step in the index where you wish to make a change and finally click on "Finish". |
Most of the parameters that can be adjusted on the fly in the normal profiling views
are selected in the comparison wizards and are fixed once the snapshot comparison has been created. These parameters
are displayed in the comparison header which has the same layout for every comparison: In the first line
you see the name of the comparison, the following lines are name value pairs of the selected parameters.
All comparisons have specific view settings that can be edited by choosing View->View Settings from the main menu or the corresponding toolbar button when the comparison is active. Common properties of comparisons include |