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.
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 |
Shows a list of all available tracks, grouped by their docking state. |
CPU/GPU |
The CPU and GPU tracks and thread group options |
Other |
The other tab toggles visibility of the following categories:
|
Plugins |
Tracks and options exposed by plugins. Example Tracks include information about Slate, Gameplay, Animation, and RDG Insights. |
View Mode |
Toggles compact mode which will display the timing tracks with reduced height supporting tracks.
Auto hides empty tracks without timing events. This option is persistent to the UnrealInsightsSettings.ini file.
The X key can be used as a shortcut to through the following different CPU Depth options:
You can assign a color to CPU/GPU timing events based on their duration (inclusive time). The color key is as follows:
These options are also persistent to the |
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.
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.
Hovering the cursor over a bar causes that frame's index and running time to appear.
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:
Enable the Task and CPU trace channels when running your application from the command line by using the following command:
-trace=default,task
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.
When hovering over a Timing Event, if the current event is inside a task, extra information will be displayed in the tooltip.
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.
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:
When analyzing your data, we recommend trying to activate each option one at a time as the number of relations can quickly become overwhelming.
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.
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.
Context Switches
Enabling the Context Switch channel is Supported for platforms: Win64, XB1/XSX, and PS4/PS5.
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".
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:
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.
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.
CPU/GPU drop down menu shows additional options re Context Switches:
The context menu of a "Core" timing event in a Cpu Thread track shows additional options:
The context menu of a "Thread" timing event in a CPU Core track shows additional options:
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.
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.
Source file and line for CPU timers
In the Timers panel, the source file/line is visible in the tooltip of each timer:
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.
|
Export Timing Events |
Exports the timing events to a text file.
If no time selection is made, the entire timeline will be exported.
|
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.
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. |