Skip to content

Open source CapCut alternative.

TypeScript

fix(site): cut-chat eval totals read the wall clock

David Le43370bd8529e
diff --git a/site/scripts/lib/cut-eval/harness.ts b/site/scripts/lib/cut-eval/harness.ts
index 5e8d60da..6ea1595e 100644
--- a/site/scripts/lib/cut-eval/harness.ts
+++ b/site/scripts/lib/cut-eval/harness.ts
@@ -207,6 +207,10 @@ export async function runCase(c: EvalCase, cfg: RunConfig): Promise<CaseResult>
} finally {
dropPiSession(threadId);
}
+ // Wall clock for the whole turn, captured at stream close. The gate runs
+ // concurrently with the first model round, so summing the stage timings
+ // would overstate what a user actually waits.
+ const wallMs = performance.now() - turnStart;
reply = reply.trim();
if (streamError) throw new Error(streamError);
@@ -261,7 +265,7 @@ export async function runCase(c: EvalCase, cfg: RunConfig): Promise<CaseResult>
ttftMs,
modelMs,
toolMs,
- totalMs: gateMs + modelMs + toolMs,
+ totalMs: wallMs,
judgeMs,
retryMs: 0,
retries: 0,