Skip to content

Commit aad0b04

Browse files
toschmidtclaude
andcommitted
show individual hot/cold/load/storage ratios in the combined view
The Combined metric collapses load, data size, cold and hot into a single weighted-geomean "×N" score, which hides how a system earned it. In the Combined view, expand the score cell to also list the four component ratios that feed it: hot, cold, load and storage, each as the relative "×N" ratio (a component that doesn't apply to the system, e.g. cold for a lukewarm engine or load for a stateless one, shows "n/a"). Each ratio is padded to a fixed width with non-breaking spaces so the columns line up in the monospace cell (6 fits "×12.34" for hot/cold/load, 5 fits "×1.23" for storage), and the overall score is shown in bold. Other metric views are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7a67a4b commit aad0b04

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,26 @@ <h2>Detailed Comparison</h2>
10861086

10871087
const text = selectors.metric == 'load' ? (elem.load_time ? `${Math.round(elem.load_time)}s (×${ratio.toFixed(2)})` : 'stateless')
10881088
: selectors.metric == 'size' ? `${(elem.data_size / 1024 / 1024 / 1024).toFixed(2)} GiB (×${ratio.toFixed(2)})`
1089+
: selectors.metric == 'combined' ? (() => {
1090+
/// Break the combined score into the components it's built
1091+
/// from (hot, cold, load, storage) as the relative "×N"
1092+
/// ratios that feed the weighted score. Pad each to a fixed
1093+
/// width so the columns line up in the monospace cell.
1094+
const fmt = (v, n) => ((v == null || !isFinite(v)) ? 'n/a' : ${v.toFixed(2)}`).padStart(n, ' ');
1095+
const hot = fmt(relativeQueryTime(num_queries, baseline_data, elem, 'hot'), 6);
1096+
const cold = fmt(metricExcludes(elem, 'cold') ? null : relativeQueryTime(num_queries, baseline_data, elem, 'cold'), 6);
1097+
const load = fmt(metricExcludes(elem, 'load') ? null : elem.load_time / min_load_time, 6);
1098+
const size = fmt(metricExcludes(elem, 'size') ? null : elem.data_size / min_data_size, 5);
1099+
return `  (hot ${hot}, cold ${cold}, load ${load}, storage ${size})`;
1100+
})()
10891101
: ${ratio.toFixed(2)}`;
10901102

1103+
// Combined shows a bold overall score followed by the (plain) breakdown.
1104+
if (selectors.metric == 'combined') {
1105+
let score = document.createElement('strong');
1106+
score.appendChild(document.createTextNode(${ratio.toFixed(2)}`));
1107+
td_number.appendChild(score);
1108+
}
10911109
td_number.appendChild(document.createTextNode(text));
10921110

10931111
let td_bar = document.createElement('td');

0 commit comments

Comments
 (0)