Published 14 May 2018
The timeline is visible throughout a profiling session. It provides an overview of application activity, displaying performance counter values and events related to the application you're profiling. You can use it to narrow down performance profiling results to a specific time period of your application's execution.
To see profiling results for a specific period, select a region on the timeline. You can change selection at any time, both during profiling and after profiling stops. You can also bookmark selected regions, letting you define regions you care about, and switch between them to look at data for different time periods.
The overview timeline shows performance data for the whole profiling session. To minimize the timeline so that only the overview is visible, clickCollapse on the Timeline bar (ANTS Performance Profiler 8.6 and later).
The slide bar of the overview timeline contains the time period shown in the main timeline. The main timeline shows the values of several Windows performance counters.
You can choose which performance counters to display before you start profiling your application. By default, only Processor Time is displayed. For more information, see Setting up chart performance counters
The event bar on the timeline shows event markers, which indicate when certain types of event occur within your application. For example, it shows button clicks, window activations, and exceptions.
For more information, see Working with event markers and method events.
Working with regions on the timeline
To select a point in time, click anywhere on the main timeline. Information about the selected point is shown in the Selected point tab to the left of the timeline:
You can select, adjust, and bookmark regions on the timeline. Whenever you select a region, the profiling results displayed relate to the selected region only.
Selecting and adjusting a region
To select a region, on the overview timeline, you can:
- Click and drag the slide bar to the region you want to select.
- Click anywhere on the overview timeline to select a region centered on the pointer.
Hold down the Shift key, and click and drag the edge of the slide bar to start selecting a new region from that point.
To move or adjust the timescale of a selected region, you can:
- On the overview timeline, click and drag the edge of the slide bar to resize the selected region.
- On the main timeline, click and drag the mouse pointer to pan the timeline.
- On the main timeline, hold down the Shift key and click and drag the pointer to zoom in on a selected region.
- On the main timeline, rotate the mouse wheel to zoom in or out.
Bookmarking a region
Bookmarks let you quickly compare regions of the timeline that you are interested in. You can bookmark a point in time or a period of time, if you want to isolate a specific piece of your application's activity.
You can create a bookmark either during or after profiling.
To bookmark a selected region, click
The selected region is now bookmarked, and is shown in the overview timeline and added to the Current Bookmarks list.
To select this bookmarked region again later, click on it on the overview timeline or in the Current Bookmarks list. Your bookmark is labelled according to the time period it spans, but you can rename a bookmark to make it easier to identify. To rename a bookmark, on the Current Bookmarks list, clicknext to the bookmark you want to rename.
To delete a bookmark, clicknext to the bookmark you want to delete.
In addition to bookmarking existing regions of the timeline, you can record live bookmarks as you profile. This is useful if you want to bookmark the behavior of your application during or after a specific event or user input. In other words, live bookmarks allow you to tally what you are doing with the results.
To start recording a live bookmark, click. When you want to stop bookmarking the current profiler activity, click
The new bookmark is shown in the overview timeline and Current Bookmarks list, and behaves in the same way as if you had created it with thebutton.
You can only create Live bookmarks during profiling.
Working with performance counters
You can choose which performance counters to display when you set up a new profiling session; see Setting up chart performance counters. To view the performance counters available for the current profiling session, to the left of the timeline, click the Chart Counters tab:
The Chart Counters tab shows all your counters, and lets you highlight one as a main counter. The main counter is shown as a filled box, and the area under its graph is shaded on the timeline. Other counters are shown with an unfilled box in the Chart Counters tab and by colored lines on the timeline.
To set a different counter as the main counter, click on its name in the Chart Counters tab. Values for the main performance counter are shown on a tooltip when you move your pointer over the main timeline. The values on the vertical axis of the main timeline are set by the main counter.
To remove a counter from the timeline, in the Chart Counters tab, clear the checkbox next to its name.
To split the timeline into separate graphs for each performance counter, click
To merge the graphs again, click
If you have more than about 8 performance counters, the graphs may become illegible when split. We recommend you use the merged graphs view and then use the checkboxes on the Chart Counters tab to control which counters you want to see.
Working with event markers and method events
The events bar directly below the main timeline indicates when certain events occurred within your application.
Events are displayed using colored markers:
Window activated and window closed
All other events
To see more detail about an event, click on the event marker in the event bar or the timeline. Information about the event is shown in the Selected Point tab:
Clickto see which method caused an event in the call tree or method grid.
If you click on a method in the call tree, on the methods grid, or when you display the call graph for a method, the times when that method executed are shown as light green areas in the events bar. These areas are called 'method events'. If the method called unmanaged code, the period when the unmanaged code ran is shown as dark green.
- Method events are not displayed when profiling Windows Store apps.
- The green method event areas only have a resolution of 250ms, so methods can appear to overlap when in fact they don't. The timings shown in the call tree or method grid are correct.
Starting with ANTS Performance Profiler 10.1.9 you can export all events (including custom event markers) to an XML or CSV file.
To learn more, see Exporting event markers to an XML or CSV file.
Adding custom event markers
It is possible to add your own event markers to the timeline. For example, you might want to know when a certain item is loaded into memory or when an ASP.NET page is loaded or unloaded. To add a custom marker:
- Copy %ProgramFles%/Red Gate/ANTS Performance Profiler 8/RedGate.Profiler.UserEvents.dll to your application's bin folder. (Create the bin folder using Windows Explorer if it does not already exist.)
- Reference the DLL from your application.
Add the following line to your application wherever you want to see an event marker on the profiler's timeline. (Replace 'The message' with a short description of the event.)
- When you profile your application, the event is shown in the ANTS Performance Profiler timeline with a black event marker. To see more detail about the event, click on the event marker:
You can't use custom event markers when profiling Silverlight applications.