When profiling your application with the Coverage and Light Coverage profilers, AQTime instruments every routine and every source code line (if you profile your application at line level) by adding special code that is used to collect profiling information. If you are profiling a large application whose source code contains a large amount of lines, you may get a significant overhead because of AQTime’s service code functioning. This may also cause the overall decrease in the profiler’s performance and slow down the profiling session.
To avoid such situations and measure your application’s code coverage more effectively, use the recommendations below:
-
To measure code coverage in large applications, first profile your application with the Light Coverage profiler. The Light Coverage profiler is similar to the Coverage profiler but it collects less data and thus works faster and consumes less memory.
After you find the most problematic areas in your code with the Light Coverage profiler, profile those particular areas with the Coverage profiler to get more detailed results.
-
First profile your application at routine level. After you analyze the coverage results and specify the most problematic areas of your application source code, you can profile them at line level to get more detailed results.
To specify code areas to profile and their profiling level, use profiling areas. To control what code to profile, you can also use triggers and actions. See Controlling What to Profile for more information.
-
Usually the Coverage profiler is used in combination with some testing tool (for example, TestComplete) and it checks what areas of your application code are covered by tests. If you need to profile a large application that implements some complicated logic, it is recommended that you not profile its entire code in a single testing session but create several shorter sessions.
To combine individual code coverage results gathered during each session to get coverage information on all application code, merge the profiling results. For information on how to do this, see Comparing Results and Merging Results. You can also enable the Auto-merge option to merge profiling results after every testing session automatically.
-
Exclude from profiling routines and source files of standard libraries embedded into your application by IDE. To do this, enable the Exclude standard source files option. For more information, see Excluding Code From Profiling.
Note: This option is supported only for native (unmanaged) and .NET applications.
See Also
Coverage Profiling
Best Practices and How to Tutorials
Coverage Profiler - Overview