/** * Decibel Benchmark MCP Tool * * First-class benchmarking tool for the decibel toolchain. * Runs benchmark suites with kind support (micro/integration), * baseline persistence, and regression detection. * * Usage: * - decibel_bench: Run TypeScript/JavaScript benchmark suites * - dojo_bench: Specialized for Dojo experiments (Python discovery) */ import { CallerRole } from './dojoPolicy.js'; import { BenchKind, BenchmarkReport } from '../lib/benchmark.js'; export interface DecibelBenchInput { project_id: string; suite_id: string; kind?: BenchKind; iterations?: number; warmup?: number; threshold_p99_ns?: number; save_baseline?: boolean; check_regression?: boolean; regression_tolerance?: number; output_format?: 'table' | 'json' | 'markdown'; caller_role?: CallerRole; agent_id?: string; } export interface DecibelBenchOutput { suite_id: string; status: 'success' | 'no_benchmarks' | 'regression_detected' | 'error'; report?: BenchmarkReport; formatted?: string; message?: string; } export interface DecibelBenchError { error: string; exitCode: number; stderr: string; } export interface BenchCompareInput { project_id: string; baseline_a: string; baseline_b: string; output_format?: 'table' | 'json' | 'markdown'; caller_role?: CallerRole; agent_id?: string; } export interface BenchDelta { id: string; a_p99_ns: number; b_p99_ns: number; delta_ns: number; delta_pct: number; winner: 'a' | 'b' | 'tie'; } export interface BenchCompareOutput { status: 'success' | 'error'; baseline_a: string; baseline_b: string; deltas: BenchDelta[]; summary: { a_wins: number; b_wins: number; ties: number; overall_winner: 'a' | 'b' | 'tie'; avg_delta_pct: number; }; formatted?: string; } export interface BenchCompareError { error: string; exitCode: number; } /** * Generate Python script to discover and run benchmarks from experiments */ export declare function generatePythonBenchRunner(experimentPath: string, kind: BenchKind, iterations: number, warmup: number, thresholdNs: number, baselinePath?: string, regressionTolerance?: number): string; export declare function isDecibelBenchError(result: unknown): result is DecibelBenchError; export declare function isBenchCompareError(result: unknown): result is BenchCompareError; /** * Run a benchmark suite from a TS/JS file * Discovers benchmarks via BENCHMARKS export or benchmarks() function */ export declare function decibelBench(input: DecibelBenchInput): Promise; /** * Compare two benchmark baselines side-by-side */ export declare function decibelBenchCompare(input: BenchCompareInput): Promise; //# sourceMappingURL=bench.d.ts.map