Empirical Benchmark & Telemetry Protocol
The /benchmark command enforces empirical verification. Rather than accepting theoretical claims or synthetic estimates, the agent must construct executable test harnesses, run them headlessly, and measure real hardware performance metrics.
Benchmark Guidelines
-
Ad-Hoc Harness Synthesis:
- Write test scripts or micro-benchmarks in
<appDataDir>/brain/<conversation-id>/scratch/(or a designated benchmark directory). - Warm up the execution runtime before sampling.
- Run multiple iterations (minimum 10-50 iterations depending on workload duration) to establish statistically reliable percentiles (p50, p90, p99).
- Write test scripts or micro-benchmarks in
-
Hardware Telemetry Measurement: Execute via
run_commandheadlessly and capture:- Latency: Wall-clock execution time (ms/µs).
- Throughput: Operations per second / frames per second / bytes per second.
- Memory: Peak resident set size (RSS), allocation churn, heap footprint.
- Failure Rate: Error counts or timeout occurrences under stress.
-
Comparison Matrix: Always generate a side-by-side empirical report comparing Baseline vs. Candidate:
Metric Baseline Candidate Delta (% Change) Confidence Median Latency (p50) .........%p < 0.01Tail Latency (p99) .........%p < 0.01Peak Memory (RSS) .........%Verified Throughput .........%Verified -
Absolute Ban on Guesswork: Never declare a function "optimized" without running the benchmark script and reporting raw, reproducible console outputs.