ViewArticle

[Collapse]AQtime/viewarticle/43079/
 [Expand]General Information/viewarticle/43079/
 [Expand]Getting Started/viewarticle/43449/
 [Expand]Profiling Applications With AQtime/viewarticle/43100/
 [Collapse]AQtime Reference/viewarticle/43097/
  [Collapse]Profilers/viewarticle/43503/
   [Expand]Performance Profiler/viewarticle/43174/
   [Expand]Allocation Profiler/viewarticle/43136/
   [Expand]BDE SQL Profiler/viewarticle/43576/
   [Expand]Coverage Profiler/viewarticle/43496/
    Exception Trace Profiler/viewarticle/43566/
   [Expand]Light Coverage Profiler/viewarticle/43126/
   [Expand]Failure Emulator Profiler/viewarticle/43308/
   [Expand]Function Trace Profiler/viewarticle/43429/
   [Expand]Load Library Tracer/viewarticle/43484/
   [Expand]Platform Compliance Profiler/viewarticle/43006/
   [Expand]Reference Count Profiler/viewarticle/43032/
   [Expand]Resource Profiler/viewarticle/43311/
   [Collapse]Sampling Profiler/viewarticle/54606/
     Sampling Profiler - Overview/viewarticle/54581/
     Sampling Profiler Options/viewarticle/54532/
    [Expand]Sampling Profiler Results/viewarticle/54545/
   [Expand]Sequence Diagram Link Profiler/viewarticle/43197/
   [Expand]Static Analysis Profiler/viewarticle/43384/
   [Expand]Unused VCL Units Profiler/viewarticle/43295/
    Counters Overview/viewarticle/43055/
  [Expand]AQtime UI Reference/viewarticle/42985/
  [Expand]AQtime Options/viewarticle/43225/
  [Expand]Automating AQtime/viewarticle/43488/
  [Expand]Extending AQtime/viewarticle/43002/
   Using AQtime on Non-English Locales/viewarticle/43465/
   Checking for Updates/viewarticle/43509/
   AQtime Data Files/viewarticle/43558/
   Unsupported Code/viewarticle/43579/
 [Expand]Development Tools Integration/viewarticle/43508/
 [Expand]Samples and Tutorials/viewarticle/43120/
 [Expand]Other Tools for Optimizing Your Applications/viewarticle/43008/
 [Expand]Licensing Guide/viewarticle/43331/
Updated: 3/2/2018 Applies To: AQtime 8 Rating: No votes Click to rate: PoorNot badAverageGoodExcellent
Sampling Profiler

Sampling Profiler - Overview

The Sampling profiler polls the application during its execution and helps you estimate how much time the application spends inside each function, file or module. This topic provides an overview of the profiler:

General Information

The Sampling profiler helps you make a quick overall look at the application’s performance. It polls the profiled application at certain intervals and determines the routine that is currently being executed. It increases the sample count for that routine and reports the number of collected samples in results. In other words, it reports the number of times a routine was found executed during the application run. The profiler also reports approximate time spent on the routine’s execution.

For better results, we recommend that you use a computer that has at least a quad-core CPU. Otherwise, the Sampling profiler may collect inaccurate data due to specifics of its functioning.

You can sort out the profiling results on the sample count or time values and easily find the functions that tend to take much time during the application run. There may be two possible reasons for this: the function is called too frequently during the application run, or the function is working slowly. In either case, such a function is a primary candidate for optimization.

With the Sampling profiler, you can analyze the performance of 32-bit and 64-bit native (unmanaged) applications. Your applications should be compiled with debug information. (see How AQtime Profilers Use Metadata and Debug Information).

The Sampling profiler can analyze the application code at two levels of detail: routine and line. To profile the lines of a routine, add the desired routines to line-level areas.

The Sampling profiler does not support triggers and actions, however, you can still control profiling with the  Enable/Disable Profiling button.

Considerations for Using the Sampling Profiler

The Sampling profiler is similar to the Performance profiler as it helps you analyze the application performance. You can use it to pinpoint potential bottlenecks in your applications. Due to its specifics, the Sampling profiler works much faster than the Performance profiler. However, the Sampling profiler collects less accurate and detailed data than the Performance profiler; it does not trace the hierarchy of function calls, nor does it collects data on child methods. It can also overlook some “quick” functions that start and complete their run during the interval between two samples.

Generally, you can use the Sampling profiler for initial exploration of the application performance. If you have a huge application, profiling its code with the Performance profiler will take much time. To save the time, you can profile this project with the Sampling profiler first, and get the list of potentially slow functions. You can then add these functions to a line-level profiling area and profile the application with Performance profiler to get detailed information on these functions’ performance and find out what code needs to be rewritten.

How Samples Are Counted

The Sampling profiler polls the profiled application at preset time intervals and analyzes the current call stack to determine the routine that is being executed. If this routine was included in profiling in the Setup panel, the profiler increases the routine’s sample count by 1.

It is quite possible that the function at the top of the call stack is not included in profiling areas. It can be a system function that your application calls, or it can be some of your application functions that you did not include into profiling. In this case, the profiler will go down the call stack trying to find an “included” routine, that is, the parent routine that called that system function or your “excluded” function. If the profiler finds this parent function, it increases its sample count. Else, it considers the sample failed to hit any routine.

In other words, the sample count for a routine includes the samples collected for this routine’s instructions and the samples collected for all the child routines, which was not included in profiling. If both the parent and child functions are included in profiling, the child function’s samples will not be added to the parent function’s samples.

See also
Sampling Profiler Results - Overview | Sampling Profiler Options | Sampling Profiler


© 2018 SmartBear Software. All rights reserved.
Email Send feedback on this document