CodeBench: kirjoita results.json jokaisen kierroksen jälkeen

Välitulokset näkyvät heti tiedostossa, ei tarvitse odottaa koko ajon loppua.
This commit is contained in:
2026-04-14 17:45:54 +03:00
parent 477c21efd0
commit 882bcece06

View File

@@ -583,6 +583,9 @@ async function main() {
if (ROUNDS > 1) r.round = round; if (ROUNDS > 1) r.round = round;
results.push(r); results.push(r);
// Tallenna tulokset jokaisen kierroksen jälkeen
writeFileSync(`${OUTPUT_DIR}/results.json`, JSON.stringify(results, null, 2));
const status = r.error ? `${r.error}` : const status = r.error ? `${r.error}` :
r.testsPassed === r.testsTotal && r.testsTotal > 0 ? `${r.testsPassed}/${r.testsTotal}` : r.testsPassed === r.testsTotal && r.testsTotal > 0 ? `${r.testsPassed}/${r.testsTotal}` :
`${r.testsPassed}/${r.testsTotal}`; `${r.testsPassed}/${r.testsTotal}`;