CSE 70, Spring 2010

Software Engineering

Lab Instructions


Profile program performance.

In this lab you'll see how to use the Eclipse Test and Performance Tools Platform (TPTP) to profile the performance of your application. Follow these directions to install and use it:

  1. Install the tracing and profiling tools.
    1. In Eclipse's Help menu, select Software Updates ...
    2. In the Software Updates and Add-ons dialog, select the Available Software tab and hit Manage Sites ...
    3. In the Available Software Sites dialog find Ganymede Update Site (the location is http://download.eclipse.org/releases/ganymede). Check the box next to it and hit OK.
    4. In the Software Updates and Add-ons dialog again, expand the node for the Ganymede Update site, then expand the Testing and Performance node. Check the box next to TPTP Tracing and Profiling Tools Project and hit Install ...
    5. In the Install dialog, hit Next, then select I accept the terms of the license agreements and hit Finish.
    6. After the installation finishes, in the Software Updates dialog, hit Yes to restart Eclipse.
  2. Run your project in the profiler.
    1. In the Package Explorer tab, expand your project. Right-click on your src folder and from the context menu, select Profile As -> Java Application.
    2. In the Edit Configuration dialog, select the Monitor tab, expand the Java Profiling node, check the box next to Execution Time Analysis, and hit Profile. Eclipse will switch to the Profiling and Logging perspective and launch your application.
    3. Use your program as usual, or if you're interested in the performance of specific features, use those. When you're finished, terminate the program normally.
  3. Examine the statistics.
    1. In the Profiling tab, expand the process and monitor and double-click on Execution Time Analysis. An Execution Statistics tab will open to the right.
    2. In the Execution Statistics tab, notice the tabs at the bottom; select the Execution Statistics tab, next to Session summmary. (Yes, this is kind of confusing!)
    3. In the Execution Statistics menu at the top, next to the tab, click the Method Level Information button (the blue circle with the white letter M inside).
    4. Just above the column headers, click "here" to set the filter. In the Filters dialog, select Highest 10 call and hit OK.
    5. Which method has the most calls? Making this method more efficient (or called less frequently) is one way to improve performance.
    6. Of those methods called most frequently, which took the most (base or cumulative) time? (Note: You can click on a column header to sort by that column.) This may be another opportunity to improve performance.
  4. Explore the profiler.

Valid XHTML 1.0 Strict Valid CSS!