# V2 Performance Profiling Bot

`V2PerformanceProfilingBot` covers `TODOS.phase-72.72.19.1.12`: it runs
standardized paths through performance-intensive areas, captures frame time
data, and compares the captured profile against baseline frame-time budgets for
regression comparison.

## Runtime Surface

- `FV2PerformanceProfilingBotConfig` defines frame count, tick rate, maximum
  regression percentage, frame pacing thresholds, and standardized profiling
  paths.
- `BuildDefaultPerformanceProfilingBotPaths` creates deterministic path records
  for performance-intensive areas such as crowd, VFX, streaming, and cinematic
  hotspots.
- `BuildPerformanceProfilingBotHarnessActions` converts each standardized path
  into headless bot harness actions with frame-time capture markers.
- `CapturePerformanceProfilingFrameTimes` records deterministic current and
  baseline frame time samples for each path.
- `ComparePerformanceProfilingAgainstBaseline` computes average frame time, p95
  frame time, hitch count, and regression percentage against the stored
  baseline.
- `RunPerformanceProfilingBot` runs the headless harness, captures all path
  samples, compares them to baselines, and aggregates regression results.
- `FormatPerformanceProfilingBotReport` emits a compact p95 frame time and
  regression report.

## QA Behavior

The bot is deterministic and complements the existing frame pacing and QA
release gate plans. It verifies standardized paths through performance-intensive
areas, captures frame time data, compares p95 frame time against baselines,
flags regressions over the configured threshold, and rejects configurations that
do not capture frame-time data.

Required capabilities: run standardized paths, performance-intensive areas,
capture frame time data, regression comparison, p95 frame time, hitch count,
baseline frame-time budgets, and headless harness execution.

## Validation Commands

```bash
python3 V2/ue/Tools/check-v2-performance-profiling-bot.py
python3 V2/ue/Tools/check-v2-economy-bot.py
python3 V2/ue/Tools/check-v2-tests-module.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/QA/PerformanceProfilingBot_V2_Contract.json
python3 -m json.tool V2/ue/Build/Horde/v2-buildgraph-job.json
python3 V2/tools/validate-v2-docs.py
```
