feat: add benchmark reporting command (task 0031)
Add the maintainer-facing `bench:report` command, the offline counterpart to `bench:run`: it opens the sample store, drains it, aggregates against the scored suite and bonus definitions, and prints the aggregator's comparison to stdout. It renders whatever has accumulated, annotating incomplete coverage rather than blocking on a complete matrix. `parseReportArgs` is the pure argument seam (`--store`, `--help`, plus a `--self-review` / `--no-self-review` variant selector). Unlike `bench:run` the boundary is offline — it reads only the local store, no host or Agent SDK — so the whole `runReportCommand` is deterministic and unit-tested, not smoke-run. Move `DEFAULT_STORE_ROOT` to `store.ts` as the single source of truth, re-exported from `run.ts` for its existing importers.
This commit was merged in pull request #32.
This commit is contained in:
@@ -2,6 +2,9 @@ import { appendFileSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import type { CellKey, ResultRecord } from "./result.js";
|
||||
|
||||
/** Where accumulated samples are stored when no store root is given. */
|
||||
export const DEFAULT_STORE_ROOT = "bench/results";
|
||||
|
||||
/** Run `read`, returning `fallback` when the target does not exist yet. */
|
||||
function ignoreEnoent<T>(read: () => T, fallback: T): T {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user