From d84a6e55c828c55e04bbde9db939c5284981096d Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Fri, 13 Dec 2024 11:21:33 +0000 Subject: [PATCH] Fixed failing duration test --- packages/evalite/src/reporter.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/evalite/src/reporter.ts b/packages/evalite/src/reporter.ts index b2a399c..8aba10b 100644 --- a/packages/evalite/src/reporter.ts +++ b/packages/evalite/src/reporter.ts @@ -329,7 +329,7 @@ export default class EvaliteReporter extends BasicReporter { (result) => !resultIdsRunning.includes(result.id) ); - // Update the eval status + // Update the eval status and duration if (isEvalComplete) { this.opts.db .prepare< @@ -338,7 +338,8 @@ export default class EvaliteReporter extends BasicReporter { >( ` UPDATE evals - SET status = @status + SET status = @status, + duration = (SELECT MAX(duration) FROM results WHERE eval_id = @id) WHERE id = @id ` )