Timing Insights

An Overview of the Timing Insights Window in Unreal Insights.

Choose your operating system:

Windows

macOS

Linux

The Timing Insights window is where you'll see per-frame performance data for different tracks along the CPU and GPU tracks. A new toolbar was added to the Timing view, splitting the Tracks drop down menu into multiple menus where you can look at different visualizations of the time your project spends on various tasks. You can select blocks of time to view in aggregate, sort or categorize data, and review log output. You can show or hide the respective panels.

timing-insights-overview

The Timing Insights window features the Frames panel (1), the Timing panel (2), the Log panel (3), the Timers and Counters tabs (4), and the Callers and Callees panels (5).

The toolbar provides the capability to select blocks of time to view in groups, sort or categorize data, and review log output. You can show or hide each of the respective tracks:

Track

Description

All Tracks all-tracks-drop-down

Shows a list of all available tracks, grouped by their docking state.

CPU/GPU cpu-gpu-drop-down

The CPU and GPU tracks and thread group options

Other other-drop-down

The other tab toggles visibility of the following categories:

  • Main Graph track.

  • File Activity tracks.

  • Asset Loading tracks.

  • Frames tracks.

Plugins plugins-drop-down

Tracks and options exposed by plugins. Example Tracks include information about Slate, Gameplay, Animation, and RDG Insights.

View Mode view-mode-drop-down

  • Compact Mode (key shortcut: C.)

Toggles compact mode which will display the timing tracks with reduced height supporting tracks.

  • Auto Hide Empty Tracks (key shortcut: V.)

Auto hides empty tracks without timing events. This option is persistent to the UnrealInsightsSettings.ini file.

  • Depth Limit (key shortcut: X.)

    • Unlimited / 4 Lanes / Single Lane.

The X key can be used as a shortcut to through the following different CPU Depth options:

  • Coloring Mode (CPU Thread tracks.)

    • By Timer Name (default.)

    • By Timer ID.

    • By Duration.

You can assign a color to CPU/GPU timing events based on their duration (inclusive time).

The color key is as follows:

  • ≥ 10ms : red.

  • ≥ 1ms : yellow.

  • ≥ 100μs : green.

  • ≥ 10μs : cyan.

  • ≥ 1μs : blue.

  • < 1μs : grey.

  • Provides Panning on Screen Edges. When enabled, the panning will continue when the mouse cursor reaches the edges of the screen.

These options are also persistent to the UnrealInsightsSettings.ini file.

Frames

The Frames track displays the total amount of time taken by each frame, by using a bar graph format. This is useful for identifying general trends, such as the low performance or framerate drops when a level is loaded, an unoptimized scene is visible, or spawning a large number of Actors simultaneously.

timing-insights-frames-track

The frames panel currently displays the Frames, Timing, Timers, Callers, Callees, counters, and Log tracks.

You can toggle the visibility to display data for that frame in the Timing, Timers, Callers, Callees, Counters, and Log tracks by clicking on each respective track.

timing-insights-visibility-toggle

Hovering the cursor over a bar causes that frame's index and running time to appear.

timing-insights-frames-track

If you then left-click the bar, the following Zoom context menu options will appear:

Option

Description

Auto Zoom

Toggles auto zoom, which brings the entire session time range to fit into the frames display window.

Zoom Timing View on Frame Selection

Toggles whether the timing view will be zoomed when a frame is selected.

These options are also persistent to the UnrealInsightsSettings.ini file.

Enabling CPU Task Trace

Follow the steps below to profile a CPU Task:

  1. Enable the Task and CPU trace channels when running your application from the command line by using the following command:

    -trace=default,task
  2. Once your trace file has started, You can open the trace to view in Unreal Insights. If a session has Taskevents, the following functionality will be available in the Timing Insights view.

  3. When hovering over a Timing Event, if the current event is inside a task, extra information will be displayed in the tooltip.

    timing-event

  4. Right-click anywhere in the Timing View panel to open thetiming view context menu. This menu is used to display new options that can be used to activate visualizations related to the Task graph.

    task-dependency

  5. When you navigate to Tasks, the Show Task Dependencies menu options will be displayed in the drop-down menu, when a timing event is selected, and if there is a task that encompasses the selected timing event, then the following data will be displayed:

  • Relations, in the form of arrows, will be drawn on the timing view to show the lifetime and stages of the task: When it was created, launched, scheduled, started, finished and completed.

  • Relations will be drawn between the current task and its prerequisites, subsequents and nested tasks.

  • A new top docked track will appear showing the stages of the task as timing events.

Show Dependencies For Prerequisites,Subsequent, and Nested tasks.

When activating one or more of these options, all of the relations mentioned in the previous section will be drawn for theprerequisites, subsequent, and nested tasks of the current task. As an example, instead of a single relation from the prerequisite task's Completed Time to the current task's Scheduled Time, you will now see the relations depicting the created, launched, scheduled, started, finished and completed stages of each prerequisite task.

In the image below you can see a visualization with all the dependency options enabled:

insights-dependency

When analyzing your data, we recommend trying to activate each option one at a time as the number of relations can quickly become overwhelming.

  1. When the Critical Path option is enabled, relations showing the critical path of the current task will be drawn. The critical path is defined as the execution chain in the current task's graph that has the longest execution time. Each component task's execution time is defined as the difference between the component's FinishedTime and StartTime (FinishedTime - StartTime).

    This Engine feature is new, therefore the formula is subject to change with optimizations in the future.

    critical-path

  2. If a trace has Task data, then the Tasks minor tab will become visible. To populate the table, select an interval on the timing view. The table will update to show all the tasks in the selected interval. The table will show each of the included timestamp options: created, launched, scheduled, started, finished, and completed timestamps. By default, these timestamps will be shown Relative to previous', which means they will be relative to the previous stage, for instance scheduled will be relative to Launched.

Double-clicking on a task in the table will draw it's relations as if it was selected by selecting a timing event in the timing view.

image alt text

Context Switches

Enabling the Context Switch channel is Supported for platforms: Win64, XB1/XSX, and PS4/PS5.

  1. You can enable the ContextSwitch trace channel in the command line:

    -trace=default,ContextSwitch

    On Windows, Depending on your user permission settings your project runtime should be "run as administrator".

  2. Open your trace file in Unreal Insights, If a session has the ContextSwitch trace event enabled, then the following information will be displayed in the Timing Insights view:

  3. Additional CPU Core tracks. One for each CPU core in the recorded trace; shows timing events indicating what thread does execute on the respective CPU core. "Unknown" timing events indicate execution of threads from other applications / processes or from the OS.

  4. Each CPU Thread has a header lane with core number events indicating on which core the respective thread is executing. The time range when a thread is executing and when it is preempted it is highlighted.

    image alt text

  5. CPU/GPU drop down menu shows additional options re Context Switches:

    image alt text

  6. The context menu of a "Core" timing event in a Cpu Thread track shows additional options:

    image alt text

  7. The context menu of a "Thread" timing event in a CPU Core track shows additional options:

    image alt text

Quick Find

The Quick Find widget is used to search and filter events displayed in the Timing View. The widget can be opened from the Timing View context menu or by using the CTRL+F shortcut when the timing view has focus.

image alt text

The Quick Find widget search logic is defined using groups and filters. Group nodes contain child Filter nodes and define the logic applied to the children's result. Filter nodes are leaf nodes and contain a filter each.

Each filter contains:

  • The filter type, that can be selected from a drop down menu.

  • The filter operator, also selectable using a drop down menu.

  • The filter value, that can be entered using a text box.

Once the filter logic is created, it can be used to search for events or filter the tracks from the Timing View.

Filter

Description

Find First

Searches for the first event matching the filter in the order of the event's start time. If a match is found it will be selected and the timing view will bring it into view.

Find Previous

Searches for the previous event matching the filter starting from the current selected event's start time. If no event is selected, it will act as a Find First.

Find Next

Searches for the next event matching the filter starting from the current selected event's start time. If no event is selected, it will act as a Find Last.

Find Last

Searches for the last event matching the filter in the order of the event's start time. If a match is found it will be selected and the timing view will bring it into view.

Apply Filter

Will highlight all timing events that pass the filter logic from the tracks.

Clear filters

Will stop highlighting events based on the filter's logic.

If you make changes to the filter's logic, you must click Apply Filter again to highlight events based on the new logic.

Timers Panel

The Timers panel lists all timer events that have run within the time range designated in the Timing panel. In addition to grouped data based on time range, the list can be sorted in ascending or descending order by the values in any active column. To change sort order, or to activate or deactivate columns, right-click anywhere in the list. The following columns are available for the Timers tab:

Export Functionality

The Timers panel includes the capability to export your timing event data by selecting one or more timers and right-clicking on the context menu.

image alt text

Source file and line for CPU timers

In the Timers panel, the source file/line is visible in the tooltip of each timer:

image alt text

Miscellaneous export options include the following:

Option

Description

Open Source in Visual Studio

Opens the source file of the selected message in Visual Studio.

Visual Studio must be already opened before using this option otherwise it might only open its Start page.

Copy To Clipboard (CTRL+C)

Copies the selection of timers and their events to clipboard.

Export (CTRL+S)

Exports the selected timers and their grouped statistics to a text file.

  1. You can navigate to the Timing view and mark the time you are interested in saving from the main timeline view by clicking and dragging on the time bar.

  2. Observe the grouped stats are updated in the Timers panel to reflect the time selection.

  3. From the Timers panel, manually select the timers you are interested in saving or use Ctrl+A to select all timers.

  4. Next, press CTRL+S or select Export from the context menu and choose a .tsv,.txt or *.csv file to save the selected timers and their aggregated statistics (for selected time range).

Export Timing Events

Exports the timing events to a text file.

  1. Navigate to the Timing view, and mark the time you are interested in exporting from the main timeline view, by clicking and dragging on the time bar.

If no time selection is made, the entire timeline will be exported.

  1. In the Timing panel, click on the CPU/GPU thread tracks to show or hide the tracks you want to export.

  2. Select the timers you are interested in, or use Ctrl+A to select all timers.

  3. Use "Export Timing Events (Selection)..." from context menu and choose a *.tsv/*.txt or *.csv file.

  4. You can export the "Threads" and "Timers" in order to match the thread id and timer id with the names of threads and timers.

More Export Options / Export Threads

Exports the list of timers to a text file. (tab-separated values or comma-separated values).

More Export Options / Export Timing Events (All)

Exports all the timing events for all CPU/GPU threads to a text file. (tab-separated values or comma-separated values).

The exported file can be massive in size, Even a small session could have several million timing events.

Log View

The Log view displays all logs generated by calls to the macro UE_LOG from the Trace session. The logs can be filtered by verbosity and category, similar to the Output Log window in the Editor.

log-view-screen

Additionally, it features a search box that filters out all log messages that don't match the text you enter. In addition to filtering, clicking any row pans the Timing panel to the time when that row's text was logged.

You can save logs by selecting one or more messages and right-clicking on the context menu and selecting one of the following options from the drop-down menu:

Menu Option

Description

Copy (CTRL+C)

Copies the selected log (with all its properties) to clipboard.

Copy Message (SHIFT+C)

Copies the message text of the selected log to clipboard

Copy Range (CTRL+SHIFT+C)

Copies all the logs in the selected time range (highlighted in blue) to the clipboard.

Copy All

Copies all the logs to clipboard.

Save Range As… (CTRL+S)

Saves all the logs in the selected time range (highlighted in blue) to a text file (tab-separated values or comma-separated values).

Save All As…

Saves all the (filtered) logs to a text file (tab-separated values or comma separated values.)

Open Source in Visual Studio

Opens the source file of the selected message in Visual Studio (or the registered IDE.)

Visual Studio must be already opened before using this option otherwise it might only open its Start page.