Skip to content

Commit 90e11c4

Browse files
committed
feat: high-level quality comparison table (pass rate, LLM/VLM, time, throughput)
1 parent 6ea1463 commit 90e11c4

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

skills/analysis/home-security-benchmark/scripts/generate-report.cjs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,35 @@ function renderQuality() {
620620
621621
// Multi-run comparison
622622
if (sel.length > 1) {
623-
html += '<div class="section-title">Quality Comparison</div>';
623+
// High-level summary comparison
624+
html += '<div class="section-title">Overall Comparison</div>';
625+
html += '<div class="table-wrap"><table class="compare-table"><thead><tr><th>Metric</th>';
626+
for (const r of sel) html += '<th class="model-col">' + esc(modelShort(r.model)) + '<br><span style="font-weight:400;font-size:0.68rem">' + shortDate(r.timestamp) + '</span></th>';
627+
html += '</tr></thead><tbody>';
628+
const hiRows = [
629+
['Pass Rate', r => r.total > 0 ? pct(r.passed, r.total) + '%' : '—'],
630+
['Score', r => r.passed + '/' + r.total],
631+
['LLM Score', r => r.llmTotal > 0 ? (r.llmPassed || 0) + '/' + (r.llmTotal || 0) : '—'],
632+
['VLM Score', r => r.vlmTotal > 0 ? (r.vlmPassed || 0) + '/' + (r.vlmTotal || 0) : '—'],
633+
['Failed', r => String(r.failed)],
634+
['Time', r => fmt(r.timeMs / 1000) + 's'],
635+
['Throughput', r => r.timeMs > 0 && r.tokens ? fmt(r.tokens / (r.timeMs / 1000)) + ' tok/s' : '—'],
636+
];
637+
for (const [label, fn] of hiRows) {
638+
html += '<tr><td>' + label + '</td>';
639+
// Find best value for highlighting
640+
const vals = sel.map(fn);
641+
for (let i = 0; i < sel.length; i++) {
642+
const isBest = label === 'Failed' ? vals[i] === String(Math.min(...sel.map(r => r.failed))) :
643+
label === 'Pass Rate' ? vals[i] === pct(Math.max(...sel.map(r => r.passed)), sel[0].total) + '%' : false;
644+
html += '<td' + (isBest && sel.length > 1 ? ' style="color:var(--green);font-weight:600"' : '') + '>' + vals[i] + '</td>';
645+
}
646+
html += '</tr>';
647+
}
648+
html += '</tbody></table></div>';
649+
650+
// Per-suite breakdown
651+
html += '<div class="section-title">Suite Comparison</div>';
624652
html += '<div class="table-wrap"><table class="compare-table"><thead><tr><th>Suite</th>';
625653
for (const r of sel) html += '<th class="model-col">' + esc(modelShort(r.model)) + '</th>';
626654
html += '</tr></thead><tbody>';

0 commit comments

Comments
 (0)