# perf-stats — Compare profiling runs Aggregates and displays timing statistics from one or two runs, with optional Markdown export. ## Usage ```bash # Show the latest run under ./logs s6 perf-stats # Compare two runs (directories or explicit files) s6 perf-stats ./logs/runs/2024_10_01 ./logs/runs/2024_10_02 # Save a Markdown report s6 perf-stats ./logs/runs/2024_10_01 -o perf.md ``` ## How it works - Searches for `metrics.json` under a run directory (or uses an explicitly provided file). - Uses `s6.utils.profiler.process_frames` to load raw event durations and `s6.utils.profiler.compute_statistics` to compute per-event stats, including: `count`, `total_ms`, `min_ms`, `max_ms`, `average_ms`, `std_dev_ms`, variance, quantiles, IQR, and best/worst 5% averages. - Prints aligned tables; when two runs are given, shows deltas and marks improvements/regressions. - With `-o/--output`, writes a Markdown report with the same comparison.