Files
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

56 lines
9.1 KiB
Plaintext

Reforger 1.8 profiling acquisition research (2026-10-07)
Scope: read-only installed engine/API/source inspection; no engine launched, no benchmark measured. Local source hashes: source-pins.json. Game Steam build 24903726; Tools build 24870687; existing repository version evidence identifies both as 1.8.0.13.
Most useful finding
The pinned Diag executable contains these adjacent display strings:
AILibrary global counts
AI total count = %d
Active AI count = %d
AIGroups/ AIAgents; LOD %02d = %d/ %d; LOD >0 = %d/ %d
Danger messages count %d; AI messages count %d
AI simulation time ms %.3f
Postponed AI simulation [s] %.3f
Highest postponed AI simulation [s] %.3f
See diag-binary-string-evidence.txt. The official Diag Menu describes AI > Performance > AILib counters. This strongly suggests a visually accessible aggregate AI simulation timing display, but it is a binary-string lead, not runtime proof of availability, updates, timing semantics, or export. The next capture should enable this counter panel in the actual 1.8 Diag/Workbench runtime and preserve screenshots with timestamps/populations. Do not label these as exclusive native CPU or subcategory times without verification.
Supported acquisition
1. In a matched private Diag/Workbench runtime, open Diag Menu (official current wiki: Win+Alt in 3D viewport). Statistics > Script profiler: frame/average (pinned executable contains off,frame,average,memory). The separate Script Profiling article says frame/continuous; prefer the running build labels. Slow script has off/1/2/5/10 ms thresholds. Preserve overlay or emitted logs; public sources inspected do not document a machine-readable CPU-time export.
2. AI > Performance > AILib counters, BT holder, AI Limits, Show IsAIActivated offer workload/activation information; confirm counter panel live as above. Keep Load balancing and Forced AI simulation LOD unchanged for baseline. Their toggles alter the workload, not just instrumentation.
3. Physics > Profile Bullet threshold settings exist in pinned Diag binary and official menu docs: disabled, >1ms, >5ms, >10ms, >20ms, >50ms. Determine its actual output live before promising usable timing capture. A slow-event threshold does not yield the complete physics total.
4. -diagMenu PATH is pinned documented (Page_CLI.html line 279); F1 saves/F2 loads menu state. A private saved state can make repeating visual diagnostics practical. Do not invent ini keys before observing a saved file.
5. -scriptExtProfiler is pinned public CLI documentation (line 213): external profiler support for script VM. Workbench stock SCR_TracyPlugin (scripts/Workbench/SCR_TracyPlugin.c in installed game data007.pak) calls Workbench.GetCwd(binDir), then Workbench.RunProcess(binDir + "/tracy/tracy-profiler.exe"). Installed stable Tools has no tracy directory/executable; search of installed game/tools/experimental trees found licenses only. Plugin existence proves launcher intent, not operational capture support. No verified compatible Tracy version, endpoint, engine native instrumentation configuration or capture/export command found. Installing arbitrary current Tracy cannot be asserted compatible. Native CPU category capture remains unestablished.
6. -logStats INTERVAL is pinned public CLI (line 189); existing runner uses -logStats 5000. Existing console logs prove coarse FPS/frame statistics and AI/AIChar counts; they have no AI-only time. Installed docs' interval description/default differs in granularity from historical commands, so preserve exact actual timestamps and command rather than asserting an undocumented measurement window.
Script API boundaries
System.GetProfileData() returns FPS, FrameTimeMs, RenderTimeMs, GPUTimeMs, SimulationTimeMs only. No BT/nav/perception/physics/animation/character/replication/entity exclusive CPU timing fields. SimulationTimeMs is total engine simulation, not AI-only.
System.GetTickCount(int prev=0) returns integer milliseconds since game startup. Timing synchronous script scopes measures elapsed wall time including synchronous native calls; does not measure async native jobs or thread CPU, and zero is below resolution rather than free work. Existing HQ timing scopes nest; don't sum parents and children or subtract them from separately sampled total simulation.
AILib public API group lists typed BT variables, not performance or load-balancer instrumentation APIs. AIWorld supports GetCurrentNumOfActiveAIs, GetLimitOfActiveAIs, SetLimitOfActiveAIs, CanAIBeActivated, CanActivateGroup, GetActiveGroupIntendedCount and GetAIAgents. These are populations/budgets, not time.
AIAgent supports GetLOD, SetLOD, SetPermanentLOD/GetPermanentLOD, PreventMaxLOD/AllowMaxLOD, GetMaxLOD, IsAIActivated and ActivateAI/DeactivateAI. The pinned generated comment says agents get disabled in MaxLOD by default. Do not classify MaxLOD/DeactivateAI as delegating AI while preserving normal simulation. LOD distributions are essential run metadata.
Stock SCR_AIDecoProfiler extends DecoratorScripted; tooltip describes external script profiler tree profiling, and TestFunction returns true. This gives a labelled scripted tree wrapper, not a native async CPU timer.
Pinned Page_CLI AI section lines 357-365: -AILimit, -activeAILimit; -AIPartialSim NUMBER default 4 sets batches before all AIs processed; -disableNavmeshStreaming; -disableAI disables AIWorld initialization and ticking. Batching/disable flags are controlled interventions, not free profiling.
CPU category report policy
BT/decisions: script profiler for scripted nodes plus potential AILib aggregate; native BT exclusive time unverified.
Navigation: path/node/activity evidence possible; no public timer/export identified.
Perception: debug panel can show state; no public timer/export identified.
Physics: Bullet threshold diagnostic exists; complete exclusive total/export unverified.
Animation/character: state and animation LOD diagnostics exist; no public CPU timer/export identified.
Replication: native logStats streaming counters quantify objects/activity, not CPU duration.
Script: supported profiler overlay and explicit elapsed timing instrumentation; clarify exclusive versus inclusive scopes.
Entity: census/spawn counters and script lifecycle scopes are not native entity simulation time.
Report unavailable categories as unavailable; no percentages inferred from aggregate FPS changes, AI counts, or subtraction.
Recommended experimental progression
First acquire a stable private Diag/Workbench counter screenshot showing AILib simulation time and populations; establish a repeatable save/load diag state and verify what script/Bullet profiler can actually export. Then measure the actual scenario with fixed populations/LOD distributions, matched player presence, hardware, FPS cap and instrumentation. Preserve whole logs and raw observations; distinguish baseline and perturbed physics/AI/LOD interventions. A cap-limited FPS graph does not establish CPU relief. A controlled variant's aggregate process CPU/frame change establishes whole-workload effects only; decision replacement can alter movement/combat and downstream native work, so cannot alone partition BT/navigation/perception shares. Native category claims require an acquired compatible profiler capture with named zones and known nesting/thread semantics.
Official sources (web inspected; current wiki is secondary to installed 1.8 pin):
https://community.bistudio.com/wiki/Arma_Reforger:Development_Executables
https://community.bistudio.com/wiki/Arma_Reforger:Diag_Menu
https://community.bistudio.com/wiki/Arma_Reforger:Script_Profiling
https://community.bistudio.com/wiki/Arma_Reforger:Startup_Parameters
Direct web open returned 403 for some pages; search index returned relevant official content. Generic Bohemia 'Performance Profiling' and ArmaScriptProfiler pages concern Arma 3/SQF. Their #captureFrame, diag_captureFrame, -profilerEnableEngine and Tracy setup cannot be carried over to Reforger without independent support.
Follow-up: programmatic AILib counter enablement
Pinned interfaceDiagMenu.html supports GetBool/GetValue/SetValue for script items, SetEngineValue/GetEngineValue and corresponding engine range getters/setters for native item IDs; SelectMenuByName(string)/SelectMenuById(int) select menus. It has no menu enumeration, lookup item by text, dump, or save API. SetEngineValue is explicitly only for debugging. Native getters return a menu SETTING, not the statistics rendered by that setting.
Pinned group__DiagMenu.html exposes only seven EDiagMenu rendering constants. Binary EDiagMenuGame names visible vehicle debug constants; EDiagMenuGameLib offered no AI constants. No publicly exposed AILib counters or Script profiler native numeric ID found; do not guess numeric IDs. AIDiagSystem generated API is an empty system interface with no getter/export. Search of historical private profiles did not find a saved diagmenu.save file. The binary names its default save path $profile:diagmenu.save; CLI -diagMenu PATH plus actual F1 save is the supported route to discovering persistence format, not fabricated saved-state keys. A client/Workbench can display its own AIWorld diagnostics; a dedicated server's corresponding visual overlay cannot be assumed forwarded to a joined client.