"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BenchmarkEngine_1 = require("./orchestrator/BenchmarkEngine");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const benchmark = new BenchmarkEngine_1.BenchmarkEngine();
    const benchmarkId = `bench-${Date.now()}`;
    benchmark.record({
        benchmarkId,
        label: 'agent:a',
        entityId: 'agent-a',
        entityType: 'agent',
        score: 7.2,
        reviewScore: 7.2,
        durationMs: 9000,
        fallbackUsed: false,
        timestamp: new Date().toISOString()
    });
    benchmark.record({
        benchmarkId,
        label: 'agent:b',
        entityId: 'agent-b',
        entityType: 'agent',
        score: 8.1,
        reviewScore: 8.1,
        durationMs: 11000,
        fallbackUsed: false,
        timestamp: new Date().toISOString()
    });
    const result = benchmark.compare(benchmarkId);
    assert(result.samples.length === 2, 'benchmark should retain both samples');
    assert(result.winner?.entityId === 'agent-b', 'benchmark should identify highest-scoring sample');
    console.log('TEST_BENCHMARK_ENGINE_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
