130 likes | 276 Views
Programmeerimine Delphi keskkonnas MTAT.03.214. Jelena Zaitseva jellen@ut.ee. http://www.automatedqa.com/products/aqtime/. AQtime's user interface consists of panels, the main menu and toolbars. Usually a complete profiling operation involves the following steps:
E N D
Programmeerimine Delphi keskkonnasMTAT.03.214 Jelena Zaitseva jellen@ut.ee
AQtime's user interface consists of panels, the main menu and toolbars
Usually a complete profiling operation involves the following steps: • Compiling your application with debug information • Opening your application in AQtime • Controlling what to profile and when to profile • Selecting the profiler to run • Running the selected profiler and analyzing the results
1. Compiling your application with debug information • Ensure that your Delphi project includes the TD32 debug info: • Open your project in Borland Delphi • Project Options: Compiler • Project Options: Linker • for Allocation profiler only: Project Options: Packages • rebuild your application profiling VCL classes
2. Opening your application in AQtime • Opening a project in AQtime • create a new project: File New Project Once the project has been created, you can add modules to profile with it • add a new module: • Project Add Module; • from Open File dialog select an executable (EXE, DLL) • (add areas: Project Add Area…)
AQtime includes ten profilers: • Allocation • Resource • Coverage • Performance • Platform Compliance • Sequence Diagram Link • Static Analysis • Exception Trace • Function Trace • Load Library Tracer
Profiling Levels • routine level1: gathers information for the entire routine. For example, the Performance profiler will trace how many times the routine was called, how long it worked, etc. • line level1: gathers information for each line of source code within it. For instance, for each source line, the Performance profiler will measure execution time, Hit Count value, etc. • class level2: the profiler tracks the creation and deletion of objects whose class names were added to these areas. • ___________________________________________ • supported by the Performance and Coverage profilers only • supported by the Allocation profiler only.
Profilers • Allocationprofiler traces the memory use during the application run: • the number of objects created in the application • the size of these objects in memory • the creation point of an object and the stack of function that calls for it • references between managed objects • the usage of allocated memory blocks It helps to determine whether allocated memory blocks or objects remain in memory after the application execution is over.
Profilers: Allocation Profiler Results Important!
Profilers • Coverageprofiler tracks one thing: whether a routine or a line was called during the run or not. • keeps track of untested code • finds unnecessary code that you can remove, once you see that the method or line remains unexecuted under all possible conditions.
Profilers • Performanceprofiler monitors • the time spent for executing a routine, • the number of routine calls, • the hierarchy of function calls, • the number of CPU cache updates that occurred during the routine execution, • etc.
Profilers: Performance Profiler Results Report panel Profiler results (the critical path for the routine is displayed in bold ) Three categories of profiling results