PDA is a tool for analysis and correlation of performance data, as well as for report generation. This short introduction explains how to interactively load performance data into PDA and work with it.
Before we can load data, we need some. PDA comes with a small demo which generates a CSV-based logfile, as well as a Java Garbage Collection logfile. Please run
This will run for five minutes and generate a CSV file named demo.csv and a garbage collection logfile javagc.log.
To run the PDA GUI, start:
Click on Configure Project to configure the current (unnamed) project.
Now we want to add some files to this project. Click on Select and select the Garbage Collection logfile javagc.log that was just generated. A window Select Parser appears. PDA automatically tries to determine which parser it thinks can handle this file. If not already preselected, please chose gc (de.nmichael.pda.parser.Gc) as the parser. In the table below, each parser provides some information on the data it can handle. Click OK to open and parse the file.
All data provided by parsers is organized in categories, which contain one or multiple series. It is very much up to the parser, how data is organized. For example, the iostat parser would provide each device as a category, and expose values such as r/s, w/s etc. as series.
To add a series, click the Add Series button of that parser. For plotting our GC output, select category newgen (which contains all events for garbage collection in the New Generation). To select all series of this category at once, scroll down in the series selection to the bottom and select --- all ---. PDA will now add all these series to the project, and automatically chose colors, styles and value ranges to plot them.
To change some attributes, now click on the Configure button of series gc:newgen:yheap (which is the current Young Heap occupancy). For test purposes, change the maximum value on the Y axis (Range Y to) to 2.0E11 (that's 200000000000.0), and change the parameter Value Axis from to logarithmic. Click OK.
Now in the Configure Project dialog, enter a Project Name (for example, GC Demo), and click OK to plot the data.
All data plotted by PDA is value-time-based. All samples are aligned along a common time axis (X axis). Each series of data may have an inidivual scale on the value axis (Y axis). On the top of the screen, each series' name can be found in the color used to plot that series. Underneath the name, you can see the value range. For example, series gc:newgen:yhead that we have edited before is plotted in red, using a value range from 0.0 to 2.0E11 on the Y axis.
Note also that different styles are used for the data. Most series are plotted using lines. Only series gc:newgen:gctime (the pause times for garbage collections in the young generation) are plotted using dots.
On the right side of the screen, click the button with the green label gc:newgen:gctime. A window named Series Statistics"" will pop up and display some statistics about this series, as the number of found samples within the selected time frame, Min/Max/Avg/Variance/Standard Deviation for this series, as well as the Min/Max/Avg distance between samples. In terms of garbage collection times, the Avg Distance is our average garbage collection Interval, and the Avg Value is the average time (in this case in milliseconds) for a garbage colelction. Click OK to close the window again.
With the mouse, you can zoom into data more closely, by selecting a certain part of the graph. Note that zooming will only zoom in on the X axis, not the Y axis. For example, zoom into the letter V of the plotted data. Now click the statistics button for series gc:newgen:gctime again and note that now the statistics only reflect the samples from the selected interval. After closing the statistics window, click the Reset Zoom button to reset the zoom.
By clicking Add Label, you can add a label to the graph and drag it to a position you like.
Click on Configure Project again to add more data. Click Select and select the demo.csv file that was generated earlier. Select parser csv (de.nmichael.pda.parser.Csv) and click OK to open and parse the data. Then click on Add Series for the demo.csv data, select category Samples and series value and click OK. Now click Configure on the just added series and change the Line Width to 10. Click OK, and OK in the Configure Project dialog to plot the data.
The purple line from the CSV parser shows the curve that the demo was trying to plot. In shape, it should match the GC output. To better align it with the rest of the data, change the selection on the right side of the screen from Series Statistics... to Configure Series..., and click on the csv:Samples:value series button below. This is a shortcut to change the properties of a series without going though Configure Project. Change Range Y to to 1.5E8 and click OK.
To save the project, select Save as... from the Project menu and save the project. It can then later be opened again.
To save the current displayed data as a PNG image, click the Save Image button or select Save As Image... from the Project menu.