Viewing Profiling Data

To view profiling data you first need to open the project in DelphiXPG, then click the "View profile data" button.

An open dialog appears, select the desired profile data file and click open. A new "Profiler" tab appears showing the profile data.

The "Profiler" tab has three sub tabs,

General

The general tab shows the following information,

  • Location of profile data file.
  • Date and time data was collected.
  • Duration of run.
  • Time spent in user code.
  • Time spent in profiler code.
  • Number of threads.
  • Status of load.

The duration of the run should be approximately equal to the sum of user plus profiler code time, the difference should normally be a few micro seconds. However if the differences is greater than this then it indicates threads have been injecting method calls into each other, see XPGSuspendThread for more details.

Status indicates if profiling completed successfully, if an error occured then its cause will be stated here.

Consolidated View

The consolidated view gives processing times summed over the threads, it has two sub tabs. One for drilling down from Module to Class to Method to Called Method, the second lists all methods.

Drill Down View

The drill down view allows you to analyse profiling data from several consolidation points allowing you to see processing demands at different levels of granularity. This view can be used to see how efficient an alogrithm is thats spread across several methods.

The modules section lists all the modules accessed during profiling and the time spent in each. The sum of the times in this section should equal the run time.

The classes section lists all the classes for the selected module and shows total time spent in their methods. A psuedo class <procedures> exists as a container for non class methods. The sum of the times in this section should equal the selected module time.

The methods section lists all the methods called for the selected class and shows,

  • Name of method
  • Number of times called
  • Time solely in this method (does not include sub call time)
  • Percentage time solely in this method
  • Sub call time, time spent in methods called from this method
  • Percentage sub call time
  • Time spent in method, sum of time soley in method and sub call time
  • Percentage time
  • Max single call time

The sum of method times should equal the selected class time.

The called method section lists the methods called from the selected method and shows,

  • Name of method
  • Number of times called
  • Time spent in sub calls
  • Percentage time in sub call

The total of sub call times should equal the selected methods sub call time.

Note: Clicking on a column title allows you to sort data into an ascending or descending sequence.

Methods View

The methods view gives a flat view across all methods irrespective of module and class. It is used to quickly identify those methods consuming the most processing time.

The methods section lists all the methods called and shows,

  • Name of method
  • Number of times called
  • Time solely in this method (does not include sub call time)
  • Percentage time solely in this method
  • Sub call time, time spent in methods called from this method
  • Percentage sub call time
  • Time spent in method, sum of time soley in method and sub call time
  • Percentage time
  • Max single call time

The called method section lists the methods called from the selected method and shows,

  • Name of method
  • Number of times called
  • Time spent in sub calls
  • Percentage time in sub call

The total of sub call times should equal the selected methods sub call time.

Note: Clicking on a column title allows you to sort data into an ascending or descending sequence.

Threads View

The Threads view gives processing time by thread. It is only shown if there is more than one thread recorded. Like the Consolidated view it has two sub tabs allowing you to drill down to a method or view all method calls.

See Drill Down View and Methods View for details about information displayed in these section.

<< Collect Profiling Data Contents Remove Profiling Code >>
Copyright © 2005-2010, Simon Cox