Day 89: every column in one run
Date: 2026-10-21 · Week 14 · Phase 5 Benchmark and optimize
What I added today
Day 88’s --join picked the one column a booking’s join prints. A reader who wants the median, the tail and the split read ran --table three times, and got every sweep table three times over to find three short blocks at the bottom.
--join takes more than one column, one block per column:
--table d74.csv d79.csv --join itl_p50_speedup itl_p99_speedup
d74.csv: ... (each sweep table, once)
d79.csv: ...
itl_p50_speedup, joined by load:
load sweep 1 sweep 2
----------------------------
1 rps 1.25x 1.50x
sweep 1: d74.csv
sweep 2: d79.csv
itl_p99_speedup, joined by load:
load sweep 1 sweep 2
----------------------------
1 rps 2.00x 3.25x
sweep 1: d74.csv
sweep 2: d79.csv
- One block per column, in the order given, a blank line between them, each under the heading that names its column. The sweep tables print once, above them all.
- Each block is byte for byte the block a one-column run prints. A test builds the two-column stdout out of the two one-column stdouts and compares.
- One name is Day 88’s output, down to the line.
reprint_sweeps(join=...)still takes a string, and now also a list. - Every column is checked against every sweep before the first line prints. A split column one two-arm sweep lacks is an empty stdout and a sentence naming the path, not a p50 block followed by an error.
- A column named twice is refused (
--join: itl_p99_speedup given twice; each column prints once), like a path given twice to--table. - Every name is still on argparse’s list:
nargs="+"withchoiceschecks each one, so a typo in the second name is exit 2 with nothing on stdout.
join_columns turns --join’s value (None, a string, or a list) into the ordered list of columns, refusing an off-list name or a repeat as a SystemExit sentence. reprint_sweeps loops check_join_column over that list inside Day 87’s try, and loops print_join over it at the end.
tests/test_table_join_columns.py has 10 tests: the order of the blocks, the tables printed once, each block being the one-column block, a lacking column refused with nothing printed, a repeat refused through the CLI and through reprint_sweeps, an off-list second name through the CLI and through reprint_sweeps, a list taken by reprint_sweeps, and the rerun mark in every block. Day 88’s 11 tests pass unchanged.
Suite 2541 green (34 GPU-gated skips), ruff clean.
Why it matters
The point of a join is to be read in one place. Day 87 moved the comparison out of five tables into one block; Day 88 let that block show the tail. Asking for both the median and the tail and getting them in two separate runs put the scrolling back.
A refusal has to come before the output, every time. If columns were checked one at a time as their blocks printed, a bad third column would leave two good blocks on stdout and a non-zero exit. A script that captured stdout would keep a half report that looks whole. Checking the whole list first keeps the rule every --table refusal has followed since Day 86: a sentence on stderr, nothing on stdout.
What I learned
- A test was green before the feature, again.
reprint_sweepsrefused a list off the list already, because["itl_p50_speedup", "eager_itl_p50_ms"] not in JOIN_COLUMNSis true and the error message printed the list’s repr, which contains the bad name. I tightened the match to the sentence (^--join eager_itl_p50_ms: not one of), so it now fails without per-name checking. Day 88’s lesson held: amatch=on a bare name is too easy to satisfy. nargs="+"andchoicescompose. argparse checks each value against the choices, so the per-name refusal at the CLI was free. The repeat is the one rule argparse does not know, so it lives injoin_columnswhere the library path sees it too.- Accepting a string and a list is one
isinstanceat the edge. Normalising to a list injoin_columnsmeans the rest ofreprint_sweepshas one shape to handle and yesterday’s callers have nothing to change.
Diagram
join-columns.png. Left: the three checks every column passes before anything prints, and the two refusals. Right: a two-column run, the tables once and a block per column in the order given.
Tomorrow
A booking’s join now reads in one run, but a reader still has to know the three column names. Next: --join all as shorthand for every column in JOIN_COLUMNS that every sweep has, in list order, so a two-arm booking gets the p50 and p99 blocks and a split booking gets all three, with the dropped split column named on stderr so the shorthand never hides a column silently.
The card run still comes first when hardware is booked.
Post angle
Day 89 of building an LLM inference engine from scratch. --join now takes several columns and prints one block per column, the sweep tables once. The design rule: every column is checked against every sweep before the first line prints, so a bad third column is an empty stdout and a sentence, never two good blocks and an exit 1 that a script might keep as a whole report. 2541 green.