feat(A.5 T23): BUDGET_OVER flag in [WB-DIAG] / [TERRAIN-DIAG]
Per Phase A.5 spec §2 acceptance criterion 6: entity dispatcher median ≤ 2.0ms; terrain dispatcher median ≤ 1.0ms at standstill. When the median exceeds the budget, prefix the DIAG line with " BUDGET_OVER" so the regression is grep-friendly during perf testing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b684db0f1
commit
c473feedb3
2 changed files with 10 additions and 2 deletions
|
|
@ -583,8 +583,12 @@ public sealed unsafe class WbDrawDispatcher : IDisposable
|
|||
long cpuP95 = Percentile95Micros(_cpuSamples);
|
||||
long gpuMed = MedianMicros(_gpuSamples);
|
||||
long gpuP95 = Percentile95Micros(_gpuSamples);
|
||||
// A.5 T23: flag when entity dispatcher median exceeds 2.0ms budget
|
||||
// (Phase A.5 spec §2 acceptance criterion 6). Grep-friendly prefix.
|
||||
const long BudgetUs = 2000;
|
||||
string budgetFlag = cpuMed > BudgetUs ? " BUDGET_OVER" : "";
|
||||
Console.WriteLine(
|
||||
$"[WB-DIAG] entSeen={_entitiesSeen} entDrawn={_entitiesDrawn} meshMissing={_meshesMissing} drawsIssued={_drawsIssued} instances={_instancesIssued} groups={_groups.Count} " +
|
||||
$"[WB-DIAG]{budgetFlag} entSeen={_entitiesSeen} entDrawn={_entitiesDrawn} meshMissing={_meshesMissing} drawsIssued={_drawsIssued} instances={_instancesIssued} groups={_groups.Count} " +
|
||||
$"cpu_us={cpuMed}m/{cpuP95}p95 gpu_us={gpuMed}m/{gpuP95}p95");
|
||||
_entitiesSeen = _entitiesDrawn = _meshesMissing = _drawsIssued = _instancesIssued = 0;
|
||||
_lastLogTick = now;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue