Skip to content

Commit

Permalink
Fixed failing duration test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Dec 13, 2024
1 parent 433275c commit d84a6e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/evalite/src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -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
`
)
Expand Down

0 comments on commit d84a6e5

Please sign in to comment.