INNER CODE UNIT · Python
generate_benchmark_report
AgentSkillOS/SkillAnything · scripts/aggregate_benchmark.py:121
def generate_benchmark_report(
benchmark: dict[str, Any], output_dir: Path
) -> None:
"""Generate benchmark.json and benchmark.md from aggregated results."""
output_dir.mkdir(parents=True, exist_ok=True)
# Write JSON
json_path = output_dir / "benchmark.json"
json_path.write_text(json.dumps(benchmark, indent=2))
print(f"Written: {json_path}")
# Write Markdown report
md_lines = [
"# Benchmark Results",
"",
f"**Runs:** {benchmark.get('num_runs', 0)}",
"",
"## Statistics",