Highlights
- Upgraded benchmark comparison to group by scenario key before latest-vs-previous deltas.
- Added troop composition templates for benchmark runs:
balanced, anti-armor, swarm.
- Enhanced matrix benchmarking with profile x intensity Cartesian runs and 2D markdown summary output.
- Extended runtime metrics with scenario dimensions for reproducible regression analysis.
- Updated benchmark workflow documentation and legacy CSV compatibility behavior.
Benchmark Tooling Changes
benchmark-compare.ps1
- Group key now includes:
enemy_ai_profile, battle_intensity, reinforce_interval_sec, reinforce_count_per_faction, troop_profile.
- Group-internal latest-vs-previous delta reporting to avoid cross-scenario mixing.
benchmark.ps1
- Added
-TroopProfile balanced|anti-armor|swarm and runtime config propagation.
benchmark-matrix.ps1
- Added
-BattleIntensity / -Intensities support.
- Added
-TroopProfile passthrough.
- Outputs profile x intensity matrix with
avg_fps / p99 / max_frame_ms cells.
- Runtime collection
RTS_p5/BenchmarkRuntime.pde now writes reinforce_interval_sec, reinforce_count_per_faction, troop_profile into runtime_metrics.csv.
RTS_p5/GameState.pde now applies troop template distributions in initial armies and reinforcement waves.
Usage Examples
# Single run with explicit scenario dimensions
powershell -ExecutionPolicy Bypass -File .\benchmark.ps1 -RunTag heavy-aa -BattleIntensity heavy -TroopProfile anti-armor -DurationSec 120 -WarmupSec 10
# Matrix run: 2 profiles x 2 intensities, swarm composition
powershell -ExecutionPolicy Bypass -File .\benchmark-matrix.ps1 -Profiles balanced,rush -Intensities medium,heavy -TroopProfile swarm
# Grouped compare report from runtime metrics
powershell -ExecutionPolicy Bypass -File .\benchmark-compare.ps1
Notes
- Existing mixed/legacy runtime CSV headers are handled with fallback defaults (
unknown/default) so comparison scripts remain usable.