feat(coder): persist token breakdown in arena decisions and schema
This commit is contained in:
@@ -162,6 +162,24 @@ describe('computeBenchmark', () => {
|
||||
expect(bench.durationMs).toBe(0);
|
||||
expect(bench.tokensPerSec).toBeNull();
|
||||
});
|
||||
|
||||
it('includes token breakdown when provided', () => {
|
||||
const breakdown = {
|
||||
system: 10,
|
||||
user: 20,
|
||||
assistant: 30,
|
||||
tools: 40,
|
||||
reasoning: 5,
|
||||
total: 105,
|
||||
};
|
||||
const bench = computeBenchmark(t0, t1, 500, 'local', breakdown);
|
||||
expect(bench.tokenBreakdown).toEqual(breakdown);
|
||||
});
|
||||
|
||||
it('defaults token breakdown to null when omitted', () => {
|
||||
const bench = computeBenchmark(t0, t1, 500, 'local');
|
||||
expect(bench.tokenBreakdown).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
// ─── sanitizeSlug ────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user