To determine what lines of your application source code are executed most or least often, you can use the Coverage profiler or the Performance profiler:
-
Make sure your application was compiled with debug information. See How AQTime Profilers Use Metadata and Debug Information.
-
Add the routines whose source code lines you want to profile to line-level areas and include these areas in profiling.
-
Profile your application with the Coverage (or the Performance) profiler and get results.
-
Select the Routines category in the Explorer panel.
-
Click the desired routine in the Report panel and switch to the Lines pane of the Details panel. The Hit Count column on this pane tells you how many times each source line was executed.
-
Sort the results on this pane by the Hit Count column in descending order. The most frequently executed lines will be at the top of the pane, the least frequently executed lines - at the bottom.
It may be more convenient to browse the profiling results together with source code. Switch to the Editor panel and view the hit count value for each source code line in the panel gutter’s Hit Count column. Switch to the Visual Studio Code Editor’s page that contains the application source code and view the hit count value for each source code line in the Hit Count column of the grid which AQTime adds to the Code Editor. Switch to the RAD Studio Editor’s page that contains the application source code and view the hit count value for each source code line in the Hit Count column of the grid which AQTime adds to the Editor.
Note: | If the Hit Count column is not visible, right-click within the guttergridgrid, select Field Chooser from the context menu and then drag the column to the guttergridgrid from the consequent Field Chooser window. |
See Also
Coverage Profiling
Best Practices and How to Tutorials
Check What Source Code Lines Were Executed
Coverage Profiler - Overview
Performance Profiler - Overview