开始录制性能追踪
要开始录制性能追踪,您可以简单地点击界面上的“开始录制”按钮。
查看追踪数据
录制完成后,点击“Trace”菜单中的“UnrealInsights”选项来查看追踪数据。
使用命令行进行追踪
如果点击录制按钮没有反应,您可以通过命令行来控制追踪的开始和结束:
- 开始追踪:在控制台输入
Trace.Start
并回车。 - 结束追踪:输入
Trace.Stop
并回车。 - 查看追踪状态:输入
Trace.Status
并回车。
Cmd: Trace.Start
LogConsoleResponse: Warning: 'Trace.Start' is being deprecated in favor of 'Trace.File'.
LogConsoleResponse: Display: Trace started (writing to file "C:/work/uino/ThingUE5/Saved/Profiling/20231205_140247.utrace").
LogConsoleResponse: Display: Enabled channels: Gpu,Screenshot,Bookmark,Frame,Cpu,Log,
Cmd: Trace.Status
LogConsoleResponse: Display: Trace status ----------------------------------------------------------
LogConsoleResponse: Display: - Connection: Tracing to 'C:/work/uino/ThingUE5/Saved/Profiling/20231205_140247.utrace'
LogConsoleResponse: Display: - Memory used: 33.13 MiB
LogConsoleResponse: Display: - Important Events cache: 0.25 MiB (0.21 MiB used + 0.05 MiB unused | 0.00 MiB waste)
LogConsoleResponse: Display: - Sent: 29.30 MiB
LogConsoleResponse: Display: - Enabled channels: Gpu, Screenshot, Bookmark, Frame, Cpu, Log
LogConsoleResponse: Display: - Available channels: Niagara, Messaging, PixelStreaming, VisualLogger,
Object, Animation, Physics, RenderCommands, RDG, Net, AudioMixer, Audio, RHICommands, Slate,
SaveTime, Stats, AssetLoadTime, LoadTime, File, StackSampling, ContextSwitch, Module, Metadata,
MemAlloc, Counters, Cook, Callstack, AssetMetadata, MemTag, Task
LogConsoleResponse: Display: -----------------------------------------------------------------------
LogSlate: Took 0.002257 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/DroidSansFallback.ttf' (3848K)
Cmd: Trace.Stop
LogConsoleResponse: Display: Tracing stopped.
LogCore: Display: Trace started (connected to trace server localhost).
LogTraceUtilities: Launched Unreal Insights executable: C:/work/uino/UnrealCode5.2Update/Engine/Binaries/Win64/UnrealInsights.exe
LogDerivedDataCache: ../../../Engine/DerivedDataCache: Maintenance finished in +00:01:57.567 and deleted 0 files with total size 0 MiB and 0 empty folders. Scanned 61722 files in 60070 folders with total size 11007 MiB.
LogCore: Display: Trace started (connected to trace server localhost).
LogCore: Sending trace snapshot to 'localhost'...
LogCore: Display: Trace snapshot generated in 0.026 seconds to "localhost
这些命令将允许您手动控制性能追踪的过程。