/** * Build an OtlpMetricsDocument from a simple benchmark input shape. * * This is the canonical way to produce OTLP output from any parser or * builder. Modeled after emit-metric's buildOtlpMetricPayload(). */ import type { OtlpMetricsDocument } from "./types.js"; import type { Direction, RunKind, SourceFormat } from "./otlp-conventions.js"; export interface OtlpResultMetric { value: number; unit?: string; direction?: Direction; } export interface OtlpResultBenchmark { name: string; tags?: Record; metrics: Record; } export interface OtlpResultContext { runId?: string; kind?: RunKind; sourceFormat: SourceFormat; ref?: string; commit?: string; workflow?: string; job?: string; runAttempt?: string; runner?: string; serviceName?: string; } export interface BuildOtlpResultOptions { benchmarks: OtlpResultBenchmark[]; context?: OtlpResultContext; } /** * Build an OtlpMetricsDocument from a list of benchmarks and optional context. * * Each benchmark becomes a scenario. Each metric key within a benchmark * becomes a separate OTLP metric with a single gauge datapoint carrying * benchkit semantic attributes. */ export declare function buildOtlpResult(options: BuildOtlpResultOptions): OtlpMetricsDocument; //# sourceMappingURL=build-otlp-result.d.ts.map