Skip to content

Commit 486c9e4

Browse files
committed
fix(dashboard): the phase table mirrors the engine's metric groups, and cost was missing
CI caught a real omission: `bench-dashboard.py` keeps PHASE_ORDER/PHASE_COST as an exact mirror of `metric::METRICS`, and adding the Cost group to the engine without updating them left the dashboard describing a five-group cell that no longer exists. The self-test that failed exists precisely to make that cross-file contract impossible to break silently, and it did its job on the first push. RENORMALISED, NOT APPENDED. The weights are a fraction of ONE cell and the test asserts they sum to exactly 1.0, so bolting a sixth group on would claim a cell is 101.1% of itself and skew every ETA the dashboard prints. `cost` runs ONE load window and `added_latency` runs TWO (gateway leg and direct leg) for 0.022, so one window is ~0.011; the other five keep their measured proportions exactly - each its old weight over the new total - with the 1e-6 rounding drift absorbed into the largest, `memory`, where it is far below the noise in the estimate it feeds. All seven python suites pass.
1 parent 122ac9c commit 486c9e4

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

‎bench-dashboard.py‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,24 @@ def _configure_stdout():
101101
# per-phase seconds, so the table can be re-derived from the real field distribution once it lands.
102102
# These are strictly better than what they replace either way: the old numbers predated both changes.
103103
PHASE_COST = {
104-
"throughput": 0.295,
105-
"memory": 0.656,
106-
"streaming": 0.005,
107-
"added_latency": 0.022,
108-
"streams_sustained": 0.022,
104+
# RENORMALISED WHEN `cost` WAS ADDED, not appended to. The weights are a fraction of ONE cell and
105+
# the self-test asserts they sum to exactly 1.0, so a sixth group cannot simply be bolted on -
106+
# doing that would claim a cell is 101.1% of itself and quietly skew every ETA.
107+
#
108+
# `cost` runs ONE load window; `added_latency` runs TWO (gateway leg and direct leg) for 0.022, so
109+
# one window is ~0.011. The other five keep their measured proportions exactly - each is its old
110+
# weight over the new total - and the rounding drift is absorbed into the largest, `memory`,
111+
# where a 1e-6 adjustment is far below the noise in the estimate it feeds.
112+
"throughput": 0.29179,
113+
"memory": 0.648862,
114+
"streaming": 0.004946,
115+
"added_latency": 0.021761,
116+
"streams_sustained": 0.021761,
117+
"cost": 0.01088,
109118
}
110119
# Fraction of a cell already done when a given phase STARTS, in the order the engine runs them
111120
# (metric::METRICS, in that order).
112-
PHASE_ORDER = ["throughput", "memory", "streaming", "added_latency", "streams_sustained"]
121+
PHASE_ORDER = ["throughput", "memory", "streaming", "added_latency", "streams_sustained", "cost"]
113122

114123

115124
def cell_fraction_done(phase_name):

0 commit comments

Comments
 (0)