Using Stop and Start

This tutorial demonstrates how to use Performance Validator’s stop and start buttons to collect profiling data for just a specific part of the application’s execution.

The process of collecting performance data has two impacts on the performance your application which you cannot control.

  • Performance overhead of collecting the performance data. This is the extra time the code monitoring the time taken for each function (and optionally each line) to execute.
  • Memory overhead of storing the performance data. This is the workspace used to store the performance data for each function (and optionally each line) executed.

You can use the “Stop Collecting” and “Start Collecting” toolbar icons to control the collection of performance related data. These icons are shown below.
Performance Validator start collecting data toolbar
Performance Validator stop collecting data toolbar

Clicking the red icon stops data collection. Clicking the green icon starts data collection.

Data collection can also be enabled or disabled when an application is launched by enabling or disabling the Collect data from application check box.

Important: If you close your application with data collection disabled, the next application launched will be launched with data collection disabled.
Performance Validator collecting data option on the launch dialog
When performance data is not collected your application continues to execute the instrumented (or sampled) application, but no performance data is collected. Thus your application runs at close to normal speed and doesn’t use any memory to store the performance statistics because the performance statistics are not being collected.

Stopping and starting data collection can be a very useful technique for collecting performance data you are interested in without paying the penalty for collecting performance data up until the time you need to.

For example: Consider a 3D CAD application that you want to profile the time taken to extrude a surface and add a boss to the extrusion. You could launch the 3D CAD application with data collection turned off, create a new 3D component and manipulate the component until you are ready to extrude the surface. At this point you would click the green icon to enable data collection, then using the 3D CAD application, extrude the surface and add a boss to the surface. Using Performance Validator you could then click the red icon to disable data collection, then close the 3D CAD application. The 3D CAD application only collects performance data during the period when data collection is enabled.

  • Click on the settings icon on the toolbar.
    Performance Validator settings icon
    The settings dialog is displayed. On the Performance tab, choose the Time Stamp Counter option. This option causes Performance Validator to instrument your application and to time various operations using the processor’s time stamp counter. If you do not want to use the time stamp counter you can choose one of the other instrumentation options. Click OK to accept the new settings.
  • Launch the sample application. Click on the launch icon on the toolbar.
    Performance Validator launch icon toolbar
  • The Launch application dialog is displayed.
    Performance Validator collect data option on launch dialog
  • Deselect the Collect data from application check box. Double click on the nativeExample.exe entry at the top of the history window. The nativeExample application is launched with data collection disabled.
  • Using the sample application, select the Sort menu and choose Quick Sort.
  • On the Statistics tab, click Refresh. Notice that the display shows no data has been collected.
    Performance Validator stop start data 1
  • Click on the Start Collecting Data icon.
    Performance Validator start collecting data toolbar
  • Using the sample application, select the Sort menu and choose Quick Sort a second time.
  • On the Statistics tab, click Refresh. Notice that the display shows data has been collected.
    Performance Validator showing collected data
  • Click on the Stop Collecting Data icon.
    Performance Validator stop collecting data toolbar
  • Close nativeExample.exe using the File menu Exit command. The application closes. Performance Validator processes any remaining data and displays the final results.Note that the final results are the as the results when you clicked the Stop Collecting Data icon. This can be useful technique to prevent statistics from the closing of the application being mixed with the statistics you are interested in.

Fully functional, free for 30 days