diff --git a/network-poc/tests/model-benchmark.mjs b/network-poc/tests/model-benchmark.mjs index c699a1f..f2e87e5 100644 --- a/network-poc/tests/model-benchmark.mjs +++ b/network-poc/tests/model-benchmark.mjs @@ -542,9 +542,18 @@ async function main() { console.log(row); } - // Tallenna JSON + // Tallenna JSON + HTML-raportti writeFileSync(`${OUTPUT_DIR}/results.json`, JSON.stringify(results, null, 2)); - console.log(`\nJSON: ${OUTPUT_DIR}/results.json`); + const templatePath = join(__dirname, 'report-template.html'); + if (existsSync(templatePath)) { + const html = readFileSync(templatePath, 'utf-8').replace( + '/*DATA_PLACEHOLDER*/[]', + JSON.stringify(results) + ); + writeFileSync(`${OUTPUT_DIR}/report.html`, html); + console.log(`\nRaportti: ${OUTPUT_DIR}/report.html`); + } + console.log(`JSON: ${OUTPUT_DIR}/results.json`); // Yhteenveto const passed = results.filter(r => !r.error && r.testsPassed === r.testsTotal && r.testsTotal > 0); diff --git a/network-poc/tests/report-template.html b/network-poc/tests/report-template.html new file mode 100644 index 0000000..7c7c417 --- /dev/null +++ b/network-poc/tests/report-template.html @@ -0,0 +1,167 @@ + + + + + +Kipina Model Benchmark + + + + +

Kipina Model Benchmark

+
+ +
+ +

Mallikohtainen yhteenveto

+
+ +

Kaikki tulokset

+
+ + + +