/** * reporter.ts — Performance report generator with CI-friendly output. * * Converts raw profile/bench data into formatted reports (JSON, Markdown, HTML) * with pass/fail evaluation against configurable thresholds. */ import type { BenchmarkResult, ComparisonMatrix } from "./benchmark.js"; import type { ProfileResult } from "./profiler.js"; export type ReportFormat = "json" | "markdown" | "html"; export interface ThresholdCheck { metric: string; threshold: number; actual: number; passed: boolean; } export interface PerformanceReport { title: string; generated_at: string; format: ReportFormat; profile_results: ProfileResult[]; benchmark_results: BenchmarkResult[]; threshold_checks: ThresholdCheck[]; overall_pass: boolean; summary: string; } export interface ReportOptions { format: ReportFormat; outputPath?: string; thresholds?: Record; profileResults?: ProfileResult[]; benchmarkResults?: BenchmarkResult[]; comparisonMatrix?: ComparisonMatrix; } /** * Evaluate thresholds against profile results. */ export declare function evaluateThresholds(profiles: ProfileResult[], thresholds: Record): ThresholdCheck[]; /** * Generate a performance report from profile/benchmark data. */ export declare function generateReport(options: ReportOptions): PerformanceReport; /** * Serialize a report to the requested format string. */ export declare function formatReport(report: PerformanceReport): string; /** * Write a report to disk. */ export declare function writeReport(report: PerformanceReport, outputPath: string): string;