UDN
Search public documentation:
PerfStats
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
UE3 Home > Performance, Profiling, & Optimization > Unreal Engine Performance Tracking System
UE3 Home > Gameplay Programming > Unreal Engine Performance Tracking System
UE3 Home > Gameplay Programming > Unreal Engine Performance Tracking System
Unreal Engine Performance Tracking System
Overview
In-game Stats


What the columns mean
Column | Meaning |
# | Used to navigate the stats hierarchy when in hierarchical mode |
CallCount | Indicates the number of times that stat was updated that frame |
IncAvg | This is the average inclusive time the stat consumed over the last few frames |
IncMax | This is the maximum time spent in the stat over the last few frames |
ExcAvg | The average time, not including child stats, spent in the stat over the last few frames |
ExcMax | The maximum time spent in the stat, not including children, over the last few frames |
Console Commands
Console commands are how you interact with the stats system in game. The stats system supports a simple set of commands for displaying stats information on the hud in game. All console commands in the stats system start with the "stat" identifier, e.g. "stat engine", which toggles the rendering of the engine stats group. Below is a table showing the console commands that are supported and their purpose.Command | Result |
inclusive | Toggles the inclusive state. If true, inclusive times are shown |
exclusive | Toggles the exclusive state. If true, exclusive times are shown |
cycles | Toggles the cycle counter state. If true, cycle counter stats are shown |
counters | Toggles the counter state. If true, counter stats are shown |
grouped | Changes the rendering mode to group view mode. Disables rendering if already in grouped mode |
hier | Changes the rendering mode to hierarchical view mode (call graph mode). Disables rendering if already in hierarchical mode |
nav "StatNum" | Moves the selection of the current stat up/down the call graph hierarchy |
color "Item" "Color" | Changes the color the specified item is rendered with |
list groups | Dumps the names of all of the stat groups to the log. Use showlog to view |
list group "GroupName" | Dumps the names of all of the stats in the named group to the log. Use showlog to view |
list list sets | List custom sets that have been saved to GEngineIni |
save "SetName" | Saves the current stats to a custom stat set in GEngineIni named "SetName" |
name "StatName" | Toggles the render flag for an individual stat. If true, the stat will be rendered with it's group |
none | Turns off stat rendering for all groups |
"GroupName" | Toggles the render flag for that group. If true, that group is rendered. If "GroupName" matches the name of a custom state set, that custom set is enabled. |
Stats Recording
This version of the stats system includes a "stats provider" framework. This framework is used to gather stats data from the game and send that to some form of external storage. At the end of each frame the list of registered providers is given a snapshot of the data. This data can be written to disk, sent across the network, integrated into another API system, etc. Epic provides support for file and networked based recording of per frame stats data.File Logging of Stats
This version of the stats system support file based recording of stats data. There are two formats that the system can write: CSV for importing into Excel and XML which is used by the stats viewer. The CSV format is good for being able quickly compare results from previous data captures. It also allows you to use all of the features that Excel has for charting and so on. The XML format is primarily used when capturing data for review later. The XML file is in the stats viewer's native format so you can just load an existing XML file into and then view the stats data.Networked Stats
Also included in the latest version is the ability to gather stats data via the network. This allows you to gather stats data for dedicated servers, which was something we've not been able to do before. It collects the stats via UDP and works across the various OS/consoles that we support. On Xbox 360, stats can also be captured by the PIX tool.Configuring Stat Recording
Stats providers are enabled via a setting in MyGameEngine.ini. Each provider is given a name and that name is used to check for configuration data in the INI file. For instance, to enable the XML file recording of stats you need to have the following in your Engine.ini file:[StatNotifyProviders] XmlStatNotifyProvider=trueBelow is the complete list of providers that Epic provides with their default configurations:
[StatNotifyProviders] XmlStatNotifyProvider=false CsvStatNotifyProvider=false StatsNotifyProvider_UDP=true PIXNamedCounterProvider=falseStats providers can also be enabled via the command line. This is done by treating the provider name as a parameter: utgame.exe ons-testmap -CsvStatNotifyProvider The above turns on comma delimited logging of stats which are written to utgame_stats.csv.
Stats Viewer
Getting Data
The viewer is used to view existing files that were saved using the file recording (see the previous section on file recording). It is also used to connect to a running game where it collects the stats information via the network. Data harvested via the network can also be saved for later review.Opening an Existing Stats File
Choose the File | Open menu option and navigate to your game's log directory. All of the stat recording facilities write their files to the game's log directory.Connecting to a Remote Game
Using the Connect | Connect To menu option brings up the dialog seen below. The dialog broadcasts an announcement message to all games when it is first created. The refresh button re-broadcasts that same message. Both broadcasts happen on the port that is specified in the dialog box. If you have multiple game teams or you want to isolate out a set of servers, you can change which port the game listens on. In order to make connecting easier, the dialog lists the type of game that is running and which platform it's on. In the picture below, I am running the UT version of the editor on my PC, an Onslaught game on my PC, and Gears of War on my Xbox 360. To start collecting stats from a game listed in the dialog, either double-click on the game you want or select it and choose the Connect button.
Viewing the Data
The picture below is an example of opening a file that was saved after collecting a large amount of data via the network. In that view, I have added two counters, FrameTime and SkelCompose, to the graph display. To help differentiate the lines a bit, the selected stat is always drawn with a bold line. The display area is representing 150 frames of data. Each stat has its own color associated with it, which can be changed by double-clicking on the stat in the list below the graph. The background color for the graph is changed the same way. To remove a stat from the display, you select the stat in the list and hit the delete key.
Adding a Stat to the Graph
You add stats to the graph by either dragging an individual stat from the tree view to the graph area or by dragging a group to the graph area. When dragging a group to the graph area, it adds all stats to the display.Aggregate Data
Aggregate data for the stat is shown in the list view. It shows the average, min, and max value for the stats. By default, those values are for the entire data set, which includes all frames. You can choose to view the aggregate data for only the set of frames being drawn by choosing the View | Ranged Aggregate Data. When viewing by range, the data is updated as you scroll through the set.Zooming the View Area
X axis scaling is done using the F1 (View | Zoom In) and F2 (View | Zoom Out) keys. This decreases/increases the number of frames plotted on the display. Y axis scaling is done on a per stat basis.Auto-scrolling During Network Gathering
While connected to a remote game, the graph display automatically scrolls to show the latest data. You can toggle this by using the F3 (View | Auto-scroll Display) key.Call Graph View
You can view the call graph for any frame by right clicking on that frame in the stats graph area and choosing the "View Frame N" option. This brings up a window that shows the call graph of stats as a tree, as seen below: