虚幻4:优化 CPU Profiling

时间:2021-04-29 03:32:36

直接拷贝官网教程的,在这里做个记录。

stat Game

stat DumpFrame -ms=0.1


Command 虚幻4:优化 CPU Profiling Description
stat Anim Shows how long skinned meshes are taking to compute per tick.
stat D3D11RHI / stat OpenGL Direct3D 11 or OpenGL RHI.
stat DumpEvents [-ms=0.1] [-all] Whenever an event is called (say from Blueprints, or for things like PhysX Task functions), they will be written to the log.
stat DumpFrame This will write to the log information about the frame rendered right after the command is recieved.
stat DumpHitches Anytime a "hitch" is detected based on t.HitchThreshold it will be written to the log.
stat Engine Shows general rendering stats like frame time as well as counters from the number of triangles being rendered.
stat Game Gives feedback on how long the various Gameplay Ticks are taking.
stat Grouped Disables stat Slow.
stat Hitches Set t.HitchThreshold to define the time in seconds that is considered a hitch. Will also dump all hitches to the log/visual studio debug e.g. [0327.87] LogEngine:Warning: HITCH @ 00m:01s:643ms,1643,72,2.
stat InitViews Displays information on how long visibility culling took and how effective it was. Visible section count is the single most important stat with respect to rendering thread performance, and that is dominated by Visible Static Mesh Elements under STAT INITVIEWS, but Visible Dynamic Primitives also factors in.
stat LightRendering Gives feedback on how long lighting and shadows are taking to render.
stat Memory Shows stats on how much memory is being used by various sub systems in Unreal Engine.
stat Particles Displays how long particle calculations are taking as well as sprite render time.
stat SceneRendering Shows general rendering statistics. This is a good starting point to find general areas of slow performance in the rendering process.
stat SceneUpdate Displays information about updating the world, including the time taken to add, update, and remove lights as well as add and remove primitives in the scene.
stat ShadowRendering Shows how long shadow calculations are taking, separate from actual shadow render time which is covered in stat LightRendering.
stat Slow [-ms=0.3] [-maxdepth=5]

This command will display stats for the game thread and the render thread. All stats will rendered as one big stats group. This command can be useful, if we don't have access to the profiler or the log file, or we want to test the basic performance of our game.

Here is the example in the running game:

This command can be configured as follows:

stat slow [-ms=1.0] [-maxdepth=4]

By default only stat items larger than 1.0 ms and stat items that are not nested more that 4 levels are displayed.

Be careful as lowering the ms or increasing the depth may affect the overall performance.

Stat slow is filtering anything lower than 0.1ms, to improve the performance and to avoid clutter. Here is an example of what you will get if you decrease your -ms and increase your -maxdepth:

stat slow -ms=0.3 -maxdepth=5

Stat slow can eat a lot of screen space, using stat slow again (or stat Grouped) will remove all visible stats groups. Further, if you enable other stats groups, the stat slow will be disabled as well.

stat Streaming Displays various statistics on streaming assets, like how much memory streaming textures are using, or how many streaming textures there are in the scene.
stat StreamingDetails More detailed statistics on streaming, like breaking down general texture streaming into more specific groups (lightmaps, static textures, and dynamic textures).
stat Unit Overall frame time as well as the game thread, rendering thread, and GPU times.
stat UnitGraph

To see a graph with the stat unit data, use stat Raw to see the unfiltered data.







https://docs.unrealengine.com/latest/INT/Engine/Performance/StatCommands/index.html