claude-code-arcane 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +104 -55
- package/agents/career/career-strategist.md +88 -0
- package/agents/career/cv-reviewer.md +81 -0
- package/agents/career/hiring-manager.md +68 -0
- package/agents/career/mock-interviewer.md +76 -0
- package/agents/freelance/client-screener.md +84 -0
- package/agents/freelance/discovery-call.md +65 -0
- package/agents/freelance/pipeline-strategist.md +99 -0
- package/agents/freelance/proposal-reviewer.md +82 -0
- package/agents/game/ue-blueprint-specialist.md +125 -0
- package/agents/game/ue-gas-specialist.md +133 -0
- package/agents/game/ue-umg-specialist.md +131 -0
- package/dist/cli.js +57 -13
- package/docs/RELEASE-SETUP.md +1 -1
- package/docs/SKILLS-CATALOG.md +67 -4
- package/docs/USER-GUIDE.md +77 -72
- package/docs/agent-hierarchy.md +21 -1
- package/docs/presentations/build_arcane_deck.py +2 -2
- package/docs/presentations/build_arcane_deck_12.py +2 -2
- package/hooks/detect-unreal.sh +90 -0
- package/package.json +2 -2
- package/profiles/freelance.yaml +43 -0
- package/profiles/job-hunt.yaml +5 -2
- package/profiles/unreal-dev.yaml +97 -0
- package/rules/drafter-reviewer.md +16 -3
- package/rules/freelance-guardrails.md +53 -0
- package/rules/gamedev/unreal-code.md +125 -0
- package/skills/career-registry/SKILL.md +95 -0
- package/skills/career-registry/scripts/career_registry.py +488 -0
- package/skills/client-screen/SKILL.md +83 -0
- package/skills/client-screen/references/red-flags.md +95 -0
- package/skills/cover-letter/SKILL.md +4 -3
- package/skills/cv-tailor/SKILL.md +11 -2
- package/skills/freelance-deliver/SKILL.md +90 -0
- package/skills/freelance-hunt/SKILL.md +126 -0
- package/skills/freelance-hunt/references/templates/Connects.md +39 -0
- package/skills/freelance-hunt/references/templates/Contrato.md +60 -0
- package/skills/freelance-hunt/references/templates/Propuesta.md +66 -0
- package/skills/freelance-kickoff/SKILL.md +94 -0
- package/skills/freelance-pipeline/SKILL.md +109 -0
- package/skills/freelance-pipeline/scripts/import_history.py +425 -0
- package/skills/freelance-profile/SKILL.md +93 -0
- package/skills/freelance-proposal/SKILL.md +112 -0
- package/skills/freelance-scan/SKILL.md +196 -0
- package/skills/freelance-scan/references/dedup.md +35 -0
- package/skills/freelance-scan/references/platforms.md +167 -0
- package/skills/freelance-scan/scripts/freelance_search.py +1077 -0
- package/skills/install-mcp/SKILL.md +135 -46
- package/skills/install-mcp/references/unreal-operations.md +55 -0
- package/skills/interview-prep/SKILL.md +11 -3
- package/skills/job-aplicar/SKILL.md +5 -1
- package/skills/job-hunt/SKILL.md +17 -0
- package/skills/job-outcome/SKILL.md +15 -1
- package/skills/job-upskill/SKILL.md +10 -2
- package/skills/ue-actor-component-architecture/SKILL.md +509 -0
- package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
- package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
- package/skills/ue-ai-navigation/SKILL.md +526 -0
- package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
- package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
- package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
- package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
- package/skills/ue-animation-system/SKILL.md +521 -0
- package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
- package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
- package/skills/ue-async-threading/SKILL.md +433 -0
- package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
- package/skills/ue-async-threading/references/threading-patterns.md +345 -0
- package/skills/ue-audio-system/SKILL.md +527 -0
- package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
- package/skills/ue-blueprints/SKILL.md +134 -0
- package/skills/ue-blueprints/references/communication.md +82 -0
- package/skills/ue-character-movement/SKILL.md +475 -0
- package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
- package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
- package/skills/ue-cpp-foundations/SKILL.md +533 -0
- package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
- package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
- package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
- package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
- package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
- package/skills/ue-data-assets-tables/SKILL.md +527 -0
- package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
- package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
- package/skills/ue-editor-tools/SKILL.md +523 -0
- package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
- package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
- package/skills/ue-game-features/SKILL.md +477 -0
- package/skills/ue-game-features/references/experience-system.md +222 -0
- package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
- package/skills/ue-gameplay-abilities/SKILL.md +518 -0
- package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
- package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
- package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
- package/skills/ue-gameplay-framework/SKILL.md +466 -0
- package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
- package/skills/ue-input-system/SKILL.md +394 -0
- package/skills/ue-input-system/references/cpp-setup.md +131 -0
- package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
- package/skills/ue-input-system/references/input-action-reference.md +731 -0
- package/skills/ue-mass-entity/SKILL.md +476 -0
- package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
- package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
- package/skills/ue-materials-rendering/SKILL.md +526 -0
- package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
- package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
- package/skills/ue-module-build-system/SKILL.md +487 -0
- package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
- package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
- package/skills/ue-naming-conventions/SKILL.md +142 -0
- package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
- package/skills/ue-naming-conventions/references/content-structure.md +83 -0
- package/skills/ue-networking-replication/SKILL.md +452 -0
- package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
- package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
- package/skills/ue-niagara-effects/SKILL.md +531 -0
- package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
- package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
- package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
- package/skills/ue-packaging/SKILL.md +116 -0
- package/skills/ue-physics-collision/SKILL.md +423 -0
- package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
- package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
- package/skills/ue-procedural-generation/SKILL.md +505 -0
- package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
- package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
- package/skills/ue-project-context/SKILL.md +305 -0
- package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
- package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
- package/skills/ue-serialization-savegames/SKILL.md +524 -0
- package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
- package/skills/ue-state-trees/SKILL.md +489 -0
- package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
- package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
- package/skills/ue-testing-debugging/SKILL.md +520 -0
- package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
- package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
- package/skills/ue-ui-umg-slate/SKILL.md +431 -0
- package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
- package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
- package/skills/ue-world-level-streaming/SKILL.md +518 -0
- package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
- package/templates/gamedev/unreal-project-context.md +107 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# Profiling Commands & Unreal Insights
|
|
2
|
+
|
|
3
|
+
Reference for stat commands, Unreal Insights capture, custom profiling markers, CSV telemetry, and performance analysis workflow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Built-in Stat Commands
|
|
8
|
+
|
|
9
|
+
All `stat` commands are typed into the in-game console (`~`) or passed via `-ExecCmds` on the command line.
|
|
10
|
+
|
|
11
|
+
### Frame & CPU
|
|
12
|
+
|
|
13
|
+
| Command | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `stat fps` | Frame rate and frame time overlay |
|
|
16
|
+
| `stat unit` | Game, Draw, GPU, Frame times in ms |
|
|
17
|
+
| `stat unitgraph` | Rolling graph of unit timings |
|
|
18
|
+
| `stat game` | Game thread breakdown: Tick, Actors, Components |
|
|
19
|
+
| `stat engine` | Engine-level counters |
|
|
20
|
+
| `stat tasks` | Async task system occupancy |
|
|
21
|
+
| `stat threads` | Per-thread CPU times |
|
|
22
|
+
| `stat slate` | Slate UI widget tick cost |
|
|
23
|
+
| `stat scenerendering` | Scene rendering draw calls and primitives |
|
|
24
|
+
| `stat initviews` | Visibility / frustum culling cost |
|
|
25
|
+
|
|
26
|
+
### Memory
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `stat memory` | High-level memory categories |
|
|
31
|
+
| `stat memoryplatform` | OS-level virtual / physical memory |
|
|
32
|
+
| `stat streaming` | Texture and mesh streaming stats |
|
|
33
|
+
| `stat streamingdetails` | Per-resource streaming detail |
|
|
34
|
+
| `memreport` | Full memory dump to `Saved/Profiling/MemReports/` |
|
|
35
|
+
| `memreport -full` | Extended dump including asset registry |
|
|
36
|
+
| `obj list class=Texture2D` | Count and size of all loaded Texture2D objects |
|
|
37
|
+
| `obj list class=StaticMesh sortby=size` | Mesh objects sorted by memory |
|
|
38
|
+
|
|
39
|
+
### GPU
|
|
40
|
+
|
|
41
|
+
| Command | Description |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `stat gpu` | Per-pass GPU time overlay (requires GPU timing support) |
|
|
44
|
+
| `ProfileGPU` | Single-frame GPU capture, opens in RenderDoc-style viewer |
|
|
45
|
+
| `r.ProfileGPU.Pattern *` | Set capture pattern (default `*` = everything) |
|
|
46
|
+
| `r.GPUBusyWait 1` | Force busy-wait timing for more accurate GPU stats |
|
|
47
|
+
|
|
48
|
+
### Networking
|
|
49
|
+
|
|
50
|
+
| Command | Description |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `stat net` | Network channel counts, saturation, packet loss |
|
|
53
|
+
| `stat netdetailed` | Per-actor replication bandwidth |
|
|
54
|
+
| `net.Stats 1` | Enable network stats overlay |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Capturing Stats to File
|
|
59
|
+
|
|
60
|
+
### .uestats Capture (Legacy)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
# In-game console
|
|
64
|
+
stat startfile # starts recording to Saved/Profiling/
|
|
65
|
+
stat stopfile # stops and writes the .uestats file
|
|
66
|
+
|
|
67
|
+
# Open in: UnrealEditor > Window > Session Frontend > Profiler tab
|
|
68
|
+
# Or use deprecated StatsViewer commandlet
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Command-Line Automated Capture
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Capture for 10 seconds then exit
|
|
75
|
+
UnrealEditor-Cmd MyGame -game \
|
|
76
|
+
-ExecCmds="stat startfile, delay 10, stat stopfile, quit" \
|
|
77
|
+
-log
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Unreal Insights
|
|
83
|
+
|
|
84
|
+
Unreal Insights replaces the legacy profiler for CPU, GPU, memory, and network trace analysis.
|
|
85
|
+
|
|
86
|
+
### Starting a Trace
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Attach Insights at launch (preferred for full coverage)
|
|
90
|
+
UnrealEditor MyGame \
|
|
91
|
+
-trace=cpu,gpu,frame,memory,loadtime,log,bookmark \
|
|
92
|
+
-tracehost=127.0.0.1 # send to local Insights recorder
|
|
93
|
+
# or -tracefile=MyCapture.utrace to write directly to disk
|
|
94
|
+
|
|
95
|
+
# Insight trace channels
|
|
96
|
+
# cpu — CPU thread events and named events
|
|
97
|
+
# gpu — GPU pass timings (requires RHI support)
|
|
98
|
+
# frame — per-frame markers
|
|
99
|
+
# memory — LLM allocation tracking
|
|
100
|
+
# loadtime — asset and package load timings
|
|
101
|
+
# log — UE_LOG lines embedded in timeline
|
|
102
|
+
# bookmark — UE_TRACE_BOOKMARK calls
|
|
103
|
+
# task — Task Graph tasks
|
|
104
|
+
# rhicommands — RHI command list
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Runtime Console Commands
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
# Start trace mid-session
|
|
111
|
+
Trace.Start cpu,frame,gpu
|
|
112
|
+
|
|
113
|
+
# Stop trace
|
|
114
|
+
Trace.Stop
|
|
115
|
+
|
|
116
|
+
# Bookmark (appears as vertical line in Insights timeline)
|
|
117
|
+
Trace.Bookmark "LevelLoaded"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Opening Insights
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Launch the standalone Insights app
|
|
124
|
+
Engine/Binaries/Win64/UnrealInsights.exe
|
|
125
|
+
|
|
126
|
+
# Open a .utrace file directly
|
|
127
|
+
UnrealInsights.exe MyCapture.utrace
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Key Insights views:
|
|
131
|
+
|
|
132
|
+
- **Timing Insights** — CPU/GPU flame chart, thread rows
|
|
133
|
+
- **Memory Insights** — allocation timeline, LLM categories
|
|
134
|
+
- **Asset Loading** — package load waterfall
|
|
135
|
+
- **Networking** — connection bandwidth and packet timeline
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Custom Profiling Markers
|
|
140
|
+
|
|
141
|
+
### SCOPE_CYCLE_COUNTER
|
|
142
|
+
|
|
143
|
+
Links to the stat system (visible in `stat MyGame` overlay and Insights).
|
|
144
|
+
|
|
145
|
+
```cpp
|
|
146
|
+
// In a .cpp file — one DECLARE per stat, referenced anywhere in the module
|
|
147
|
+
DECLARE_STATS_GROUP(TEXT("MyGame"), STATGROUP_MyGame, STATCAT_Advanced);
|
|
148
|
+
DECLARE_CYCLE_STAT(TEXT("InventoryTick"), STAT_InventoryTick, STATGROUP_MyGame);
|
|
149
|
+
DECLARE_CYCLE_STAT(TEXT("PathFinder"), STAT_PathFinder, STATGROUP_MyGame);
|
|
150
|
+
DECLARE_CYCLE_STAT(TEXT("AbilityResolve"), STAT_AbilityResolve, STATGROUP_MyGame);
|
|
151
|
+
|
|
152
|
+
// Usage
|
|
153
|
+
void UInventoryComponent::TickComponent(float DeltaTime, ...)
|
|
154
|
+
{
|
|
155
|
+
SCOPE_CYCLE_COUNTER(STAT_InventoryTick);
|
|
156
|
+
// ...
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### SCOPED_NAMED_EVENT
|
|
161
|
+
|
|
162
|
+
Shows as a colored block in Insights without stat overhead.
|
|
163
|
+
|
|
164
|
+
```cpp
|
|
165
|
+
#include "HAL/PlatformMisc.h"
|
|
166
|
+
|
|
167
|
+
void UMySystem::ProcessBatch()
|
|
168
|
+
{
|
|
169
|
+
SCOPED_NAMED_EVENT(MySystem_ProcessBatch, FColor::Orange);
|
|
170
|
+
for (auto& Item : Batch)
|
|
171
|
+
{
|
|
172
|
+
SCOPED_NAMED_EVENT_TEXT("ItemProcess", FColor::Yellow);
|
|
173
|
+
Process(Item);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### UE_TRACE_BOOKMARK
|
|
179
|
+
|
|
180
|
+
Places a labelled vertical marker in the Insights timeline.
|
|
181
|
+
|
|
182
|
+
```cpp
|
|
183
|
+
#include "ProfilingDebugging/TraceAuxiliary.h" // or use Trace.Bookmark in console
|
|
184
|
+
|
|
185
|
+
UE_TRACE_BOOKMARK(TEXT("WaveStarted_%d"), WaveNumber);
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## CSV Profiling
|
|
191
|
+
|
|
192
|
+
CSV profiling writes lightweight, always-on telemetry to `Saved/Profiling/CSVStats/`. Enable with `-csvstatfile` or the auto-started profiler.
|
|
193
|
+
|
|
194
|
+
```cpp
|
|
195
|
+
#include "ProfilingDebugging/CsvProfiler.h"
|
|
196
|
+
|
|
197
|
+
// Declare category once per module
|
|
198
|
+
CSV_DEFINE_CATEGORY(MyGame, true); // true = enabled by default
|
|
199
|
+
|
|
200
|
+
// Timing stat in a function (duration captured each frame)
|
|
201
|
+
void UMySystem::Tick(float DeltaTime)
|
|
202
|
+
{
|
|
203
|
+
CSV_SCOPED_TIMING_STAT(MyGame, SystemTick);
|
|
204
|
+
// ...
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Custom scalar value
|
|
208
|
+
void UMySystem::PostSpawn()
|
|
209
|
+
{
|
|
210
|
+
CSV_CUSTOM_STAT(MyGame, ActiveEnemies, ActiveEnemyCount, ECsvCustomStatOp::Set);
|
|
211
|
+
CSV_CUSTOM_STAT(MyGame, DamageDealt, FrameDamage, ECsvCustomStatOp::Accumulate);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Named event (segment in CSV timeline)
|
|
215
|
+
CSV_EVENT(MyGame, TEXT("LevelLoaded"));
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Launching with CSV Capture
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
UnrealEditor-Cmd MyGame -game \
|
|
222
|
+
-csvstatfile=MySession.csv \
|
|
223
|
+
-csvCaptureFrames=1000 \ # capture 1000 frames then stop
|
|
224
|
+
-log
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Open `.csv` output with Python / Excel or the **PerfReportTool** (`Engine/Extras/PerfReportTool/`).
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## LLM (Low-Level Memory Tracker)
|
|
232
|
+
|
|
233
|
+
LLM categorises allocations for memory profiling in Insights.
|
|
234
|
+
|
|
235
|
+
```cpp
|
|
236
|
+
#include "HAL/LowLevelMemTracker.h"
|
|
237
|
+
|
|
238
|
+
// Push/pop a custom LLM scope
|
|
239
|
+
LLM_SCOPE(ELLMTag::EngineMisc); // built-in tag
|
|
240
|
+
LLM_SCOPE_BYTAG(MyGame_Inventory); // custom tag (declared separately)
|
|
241
|
+
|
|
242
|
+
// Declare a custom LLM tag (in a cpp, once)
|
|
243
|
+
LLM_DEFINE_TAG(MyGame_Inventory, TEXT("MyGame/Inventory"), TEXT("MyGame"));
|
|
244
|
+
|
|
245
|
+
// Use in allocations
|
|
246
|
+
{
|
|
247
|
+
LLM_SCOPE_BYTAG(MyGame_Inventory);
|
|
248
|
+
InventoryData = new FInventoryData();
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Activate LLM at launch:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
UnrealEditor MyGame -LLM -trace=memory -tracehost=127.0.0.1
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Performance Analysis Workflow
|
|
261
|
+
|
|
262
|
+
### 1. Identify the Bottleneck
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
stat unit # Is Frame time dominated by Game, Draw, or GPU?
|
|
266
|
+
stat fps # Confirm frame rate
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
- **Game > 33ms** → CPU game thread (tick, AI, physics logic)
|
|
270
|
+
- **Draw > 33ms** → Render thread (draw calls, visibility)
|
|
271
|
+
- **GPU > 33ms** → GPU fill rate, overdraw, shader complexity
|
|
272
|
+
|
|
273
|
+
### 2. Drill Down on CPU
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
stat game # Which game-thread category?
|
|
277
|
+
stat engine # Is it engine overhead?
|
|
278
|
+
stat tasks # Async task contention?
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Then capture with Insights (`-trace=cpu,frame`) and look at the flame chart.
|
|
282
|
+
|
|
283
|
+
### 3. Drill Down on GPU
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
stat gpu # Per-pass timings
|
|
287
|
+
ProfileGPU # Single-frame breakdown
|
|
288
|
+
r.ProfileGPU.Pattern BasePass # isolate specific pass
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### 4. Memory Pressure
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
stat memory
|
|
295
|
+
memreport -full
|
|
296
|
+
obj list class=Texture2D sortby=size
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Insights memory view shows allocation spikes over time.
|
|
300
|
+
|
|
301
|
+
### 5. Reproduce and Baseline
|
|
302
|
+
|
|
303
|
+
Always capture a baseline before any optimization. Use CSV profiling for production telemetry:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Baseline run
|
|
307
|
+
UnrealEditor-Cmd MyGame -game -csvstatfile=Baseline.csv -csvCaptureFrames=600
|
|
308
|
+
|
|
309
|
+
# After optimization
|
|
310
|
+
UnrealEditor-Cmd MyGame -game -csvstatfile=Optimized.csv -csvCaptureFrames=600
|
|
311
|
+
|
|
312
|
+
# Diff with PerfReportTool or a Python script
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## GPU Profiling with RenderDoc
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Launch with RenderDoc capture support
|
|
321
|
+
UnrealEditor MyGame -AttachRenderDoc
|
|
322
|
+
|
|
323
|
+
# In-game console
|
|
324
|
+
renderdoc.CaptureFrame # capture next frame
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Or attach RenderDoc externally and use **F12** to capture. Open `.rdc` in the RenderDoc UI for draw-call-level inspection.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Profiling on Device (Mobile / Console)
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
# iOS / Android — tunnel Insights over USB
|
|
335
|
+
UnrealInsights.exe -RecorderAddress=127.0.0.1:1980
|
|
336
|
+
|
|
337
|
+
# On device launch with
|
|
338
|
+
-trace=cpu,frame -tracehost=<HOST_IP>
|
|
339
|
+
|
|
340
|
+
# Console-specific profiling tools (e.g. PlayStation Razor / Xbox PIX)
|
|
341
|
+
# integrate via platform-specific plugin; SCOPE_CYCLE_COUNTER feeds into them automatically
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Quick Reference: Command-Line Profiling Flags
|
|
347
|
+
|
|
348
|
+
| Flag | Effect |
|
|
349
|
+
|---|---|
|
|
350
|
+
| `-trace=cpu,gpu,frame,memory,log` | Enable trace channels for Insights |
|
|
351
|
+
| `-tracehost=127.0.0.1` | Send trace to local Insights recorder |
|
|
352
|
+
| `-tracefile=Output.utrace` | Write trace directly to file |
|
|
353
|
+
| `-LLM` | Enable Low-Level Memory Tracker |
|
|
354
|
+
| `-csvstatfile=Out.csv` | Start CSV profiling |
|
|
355
|
+
| `-csvCaptureFrames=N` | Stop CSV after N frames |
|
|
356
|
+
| `-statnamedevents` | Include stat names in profiler named events |
|
|
357
|
+
| `-ExecCmds="stat startfile"` | Begin stats file capture on startup |
|