datacenter-layout-viewer 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. datacenter_layout_viewer-1.0.0.dist-info/METADATA +868 -0
  2. datacenter_layout_viewer-1.0.0.dist-info/RECORD +43 -0
  3. datacenter_layout_viewer-1.0.0.dist-info/WHEEL +4 -0
  4. datacenter_layout_viewer-1.0.0.dist-info/entry_points.txt +4 -0
  5. datacenter_layout_viewer-1.0.0.dist-info/licenses/LICENSE +674 -0
  6. dcviz/__init__.py +46 -0
  7. dcviz/__main__.py +11 -0
  8. dcviz/cli.py +98 -0
  9. dcviz/dcadd.py +214 -0
  10. dcviz/dcimport.py +348 -0
  11. dcviz/serve.py +156 -0
  12. dcviz/static/LICENSE +674 -0
  13. dcviz/static/README.md +843 -0
  14. dcviz/static/css/app.css +630 -0
  15. dcviz/static/docs/converting-data-to-overlays.md +329 -0
  16. dcviz/static/docs/releasing.md +95 -0
  17. dcviz/static/examples/hostnames-results.tsv +2883 -0
  18. dcviz/static/examples/hostnames.dc +42 -0
  19. dcviz/static/examples/iperf/README.md +101 -0
  20. dcviz/static/examples/iperf/floor.dc +93 -0
  21. dcviz/static/examples/iperf/results.tsv +2127 -0
  22. dcviz/static/examples/mega.dc +45 -0
  23. dcviz/static/examples/mx/README.md +65 -0
  24. dcviz/static/examples/mx/floor.dc +75 -0
  25. dcviz/static/examples/mx/mx-results.tsv +916 -0
  26. dcviz/static/examples/small-results.tsv +2893 -0
  27. dcviz/static/examples/small.dc +47 -0
  28. dcviz/static/examples/three-rows.dc +20 -0
  29. dcviz/static/index.html +169 -0
  30. dcviz/static/js/app.js +1543 -0
  31. dcviz/static/js/browse.js +334 -0
  32. dcviz/static/js/expand.js +121 -0
  33. dcviz/static/js/filter.js +229 -0
  34. dcviz/static/js/hints.js +412 -0
  35. dcviz/static/js/layout.js +152 -0
  36. dcviz/static/js/palette.js +128 -0
  37. dcviz/static/js/parse.js +832 -0
  38. dcviz/static/js/render.js +714 -0
  39. dcviz/static/js/report.js +94 -0
  40. dcviz/static/js/results.js +923 -0
  41. dcviz/static/js/select.js +103 -0
  42. dcviz/static/js/ui.js +819 -0
  43. dcviz/static/js/version.js +27 -0
@@ -0,0 +1,868 @@
1
+ Metadata-Version: 2.5
2
+ Name: datacenter-layout-viewer
3
+ Version: 1.0.0
4
+ Summary: A very light datacenter floor-plan viewer: one plain-text file describes the whole datacenter, a second paints test results over it.
5
+ Project-URL: Homepage, https://github.com/MartinGallagher-code/datacenter_visualization
6
+ Project-URL: Source, https://github.com/MartinGallagher-code/datacenter_visualization
7
+ Project-URL: Changelog, https://github.com/MartinGallagher-code/datacenter_visualization/blob/main/CHANGELOG.md
8
+ Project-URL: Issues, https://github.com/MartinGallagher-code/datacenter_visualization/issues
9
+ Author: Martin J. Gallagher
10
+ License-Expression: GPL-3.0-or-later
11
+ License-File: LICENSE
12
+ Keywords: datacenter,floor-plan,network,overlay,rack,visualization
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Web Environment
15
+ Classifier: Intended Audience :: Information Technology
16
+ Classifier: Intended Audience :: System Administrators
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: JavaScript
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Classifier: Topic :: System :: Networking :: Monitoring
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+
26
+ # layout_visualizer
27
+
28
+ A very light datacenter viewer. One plain-text file describes the whole
29
+ datacenter — rooms, rows, racks, servers, and the logical networks between them
30
+ — compactly enough that a hyperscale campus fits on a single page. A second
31
+ append-only file carries test results, which the viewer paints over the layout
32
+ as any number of simultaneous color overlays.
33
+
34
+ No build step, no dependencies, no server-side anything. Static files only.
35
+
36
+ Current version **1.0.0** — see [CHANGELOG.md](CHANGELOG.md). One number
37
+ covers the viewer, the file formats and the tools; the formats are the
38
+ compatibility promise, so a file that loads today loads on every later 1.x
39
+ ([how a release is cut](docs/releasing.md)).
40
+
41
+ ## Run it
42
+
43
+ Any static file server works, and a clone is already the whole app:
44
+
45
+ ```sh
46
+ python3 -m http.server 8000 # in the clone
47
+ # open http://localhost:8000/
48
+ ```
49
+
50
+ Or install it, and get the server and the two overlay tools with it:
51
+
52
+ ```sh
53
+ pip install datacenter-layout-viewer
54
+ dcviz serve # opens the viewer in a browser
55
+ dcviz serve --dir ~/layouts # ... with that directory at /files/
56
+ ```
57
+
58
+ The package has **no runtime dependencies** — it is the same static files
59
+ plus a hundred lines of `http.server` — and neither route is more supported
60
+ than the other. A server is not optional, though: browsers refuse to load ES
61
+ modules from a `file://` URL, so opening `index.html` directly gives a page
62
+ with dead buttons and a banner saying so.
63
+
64
+ The viewer starts empty. Load files with the **Load files…** button, from the
65
+ **Files** browser in the left panel, by dragging them onto the window, or with
66
+ URL parameters. Where the browser supports it (Chromium), the button reopens in
67
+ the directory it was last used in; elsewhere it is the ordinary file input:
68
+
69
+ ```
70
+ http://localhost:8000/?layout=examples/small.dc&results=examples/small-results.tsv
71
+ ```
72
+
73
+ Try the scale test: `?layout=examples/mega.dc` is a ~256,000-element
74
+ campus with ~560,000 cables, described in 45 lines.
75
+
76
+ Or write a layout from nothing: **Edit layout** opens an editor under the
77
+ canvas that re-parses on every keystroke, so the floor plan, a per-kind tally
78
+ (`3 rows · 24 racks · 216 nodes`) and any warnings follow the line being
79
+ written. **Insert template** drops in a commented skeleton to start from, and
80
+ **Download .dc** saves the result as a file. The same editor works on a loaded
81
+ file, which makes it the quickest way to learn what a line expands to.
82
+
83
+ The editor completes as you type (or on **Ctrl+Space**): kinds at the start of
84
+ a line, then the keys that line takes, then values — enumerated ones like
85
+ `mode=` and `style=`, and ones harvested from the layout itself, so `role=`
86
+ offers the roles this file already uses and `+` offers its tags. **Syntax**
87
+ opens a reference panel beside the text with every construct as a
88
+ click-to-insert snippet.
89
+
90
+ ## The layout file (`.dc`)
91
+
92
+ Indentation-based. Every line is `<kind> <id> [key=value ...] [+tag ...]`:
93
+
94
+ ```
95
+ dc IAD1 name="Acme IAD1" +prod region=us-east
96
+
97
+ room DH1 name="Data Hall 1"
98
+ row A..D +compute
99
+ rack R[01..06] u=42
100
+ node tor at=42 role=tor +switch
101
+ node u[01..20] role=server +x86 +gpu model=hgx-h100
102
+ ```
103
+
104
+ Those eight lines are 504 elements: ranges expand (`A..D`, `R[01..06]`,
105
+ `u[01..20]`), and the children of an expanded line are created once per
106
+ expansion. That multiplication is what makes the biggest datacenter fit on a
107
+ page — the `examples/mega.dc` campus is 8 halls × 24 rows × 40 racks × 41
108
+ devices from one nesting.
109
+
110
+ ### Kinds
111
+
112
+ `dc`, `room`, `row`, `rack`, `node` get purpose-built layout (rows line racks
113
+ up on a shared floor; racks stack their children into real U-slots). **Any
114
+ other word works too** — `pod`, `hall`, `cage`, `suite` — and is drawn as a
115
+ generic container. There is no schema to declare.
116
+
117
+ Indentation is the structure, so a line indented one level too shallow
118
+ re-parents everything below it. The tell is a `node` that ends up containing
119
+ other elements — its rack sits empty with the "contents" drawn beside it —
120
+ and the parser reports it as a warning. Children sit deeper than their
121
+ parent; siblings align. (A deliberate container should be a non-node kind
122
+ like `chassis`, which nests silently.)
123
+
124
+ ### Ranges
125
+
126
+ | Spec | Expands to |
127
+ |---|---|
128
+ | `R[01..20]` | `R01 R02 … R20` (zero-padding kept) |
129
+ | `u[1..40x2]` | `u1 u3 … u39` (step) |
130
+ | `A..H` | `A B … H` (letters; bare or bracketed — both ends must be the same alphabet, so `A..z` is refused rather than expanded through the punctuation between `Z` and `a`) |
131
+ | `[web\|db\|cache]` | `web db cache` (alternatives) |
132
+ | `r[1..2]-[a\|b]` | `r1-a r1-b r2-a r2-b` (cartesian) |
133
+ | `R[1..4,7..10]` | `R1 … R4 R7 … R10` (comma-separated segments) |
134
+
135
+ A spec that expands to nothing (`r[,]`) is reported: it would otherwise take
136
+ the line and everything indented under it away without a trace.
137
+
138
+ A mistake in a line's attributes is reported once for the line, naming what
139
+ was written (`"R[01..40]"`) rather than once for each of the forty racks it
140
+ became.
141
+
142
+ Segments are how numbering with holes stays on one line: racks 1–4 and 7–10
143
+ around a gap are `rack R[1..4,7..10]`, with the children written once instead
144
+ of once per block — see `examples/three-rows.dc`, which also pins sparse
145
+ U-slots the same way (`node [7..15x2,25..31x2] id=u{id} at={id}`).
146
+
147
+ A placeholder naming something not in scope is reported rather than left in
148
+ the text — `{rak}` for `{rack}`, or `{id}` in an id spec, where the id does
149
+ not exist yet — and the warning lists the names that line could have used.
150
+
151
+ `{placeholders}` in attributes refer to enclosing elements:
152
+ `name="Hall {id}"`, `power=grid-{i}`, `{room}`, `{row}`, `{parent}`.
153
+
154
+ This is how flat hostname-style names work: `node u[01..40]
155
+ name={room}{rack}{id}` names every server like `wr12r06u15`, results files
156
+ can then target that name directly, and the row stays expressed by nesting
157
+ without appearing in the name — see `examples/hostnames.dc`.
158
+
159
+ ### Attributes and tags
160
+
161
+ - `key=value` attributes are free-form and **inherit** downward (children see
162
+ the parent's `region=us-east` unless they override it). Layout-only keys
163
+ (`u`, `at`, `cols`, `dir`, `name`, …) do not inherit.
164
+ - `+tag` tags are free-form keywords; every element can carry many, and every
165
+ element also carries its ancestors' tags. `+a,b,c` adds three at once.
166
+ - Rack children: `u=4` gives a node 4 U of height, `at=42` pins it to a slot;
167
+ unplaced children auto-fill the lowest free run of slots. A node that lands
168
+ above the rack's declared `u=` height is reported as a warning — `at=42`
169
+ only fits a rack at least 42 U tall.
170
+ - `cols=2` / `dir=x|y` / `gap=` shape generic containers — `gap=0` packs
171
+ children with no gutter, and omitting it keeps the per-kind default.
172
+ - The numbers are checked: `u`, `at`, `size` and `cols` must be whole and
173
+ between 1 and 1000 (`gap` from 0), and a net's `width` between 0.1 and 100. Anything else
174
+ is reported and ignored rather than quietly coerced — `u=1e9` used to read
175
+ as 1 and `u=-5` drew a rack of negative height.
176
+
177
+ ### Networks
178
+
179
+ Logical fabrics, drawn as differently colored/styled cable layers. Rules match
180
+ elements by selector, so you never enumerate cables:
181
+
182
+ ```
183
+ net data label="Data / east-west" color=#4fa3ff
184
+ net mgmt label="Out-of-band mgmt" color=#8b93a7 style=dashed
185
+
186
+ link data role=server role=tor scope=rack # star, per rack
187
+ link data role=tor role=spine scope=hall # every ToR to every spine
188
+ link storage +storage,role=server scope=row mode=mesh # full mesh within a row
189
+ ```
190
+
191
+ - Selectors: `+tag`, `^tag` (non-inherited), `kind=rack`, `attr=value`,
192
+ bare glob against id/path/ancestors, `!` negation, `|` alternatives,
193
+ `,` for AND.
194
+ - `color=` takes any CSS colour — hex (`#4fa3ff`, `#fff`), a name (`teal`),
195
+ or a function (`rgb(1,2,3)`, quoted if it contains a space). One the browser
196
+ cannot read is reported and dropped: the canvas ignores a colour it cannot
197
+ parse and silently keeps the last one, which would paint the net in the
198
+ previous net's colour.
199
+ - **Globs work in every part of a selector**, tags included: `*` stands for
200
+ any run of characters and `?` for exactly one. `model=r76*` takes r760 and
201
+ r7625 alike, `model=r762?` only the five-character one, `u1?` the slots
202
+ u10–u19, and `+stor*` any tag starting `stor`.
203
+ - `scope=` groups matches per rack/row/room/… before wiring.
204
+ - `mode=` is `star` (A×B, default with two selectors), `mesh` (default with
205
+ one), `chain`, `ring`, or `pair` (A[i] to B[i]; with one selector,
206
+ consecutive matches pair off — 1st–2nd, 3rd–4th, …). `pair` between two
207
+ selectors of different lengths stops at the shorter one and reports how
208
+ many were left unwired — two spines paired with eight ToRs is two cables
209
+ and six racks with no uplink, which `mode=star` is almost always what was
210
+ meant. With one selector an odd count leaves one over, which is inherent
211
+ and says nothing.
212
+ - `cap=` stops a rule after that many cables, which is how a selector that
213
+ turns out to match half the floor is kept from wiring all of it. A cap that
214
+ is not a whole number between 1 and 100,000,000 is reported and ignored, and
215
+ a rule that hits its cap says so.
216
+ - A rule wires **two** selectors. A third token is reported rather than
217
+ dropped, which is what catches a mistyped option — `scoope=rack` cannot be
218
+ told apart from selecting on an attribute called `scoope`, but it can be
219
+ counted.
220
+ - A rule that wires nothing says so: a selector that matched no elements (the
221
+ shape a typo makes) and a rule whose matches produced no cables are both
222
+ reported as warnings rather than left as a silently empty fabric.
223
+ - Declared nets **start visible** on a modest floor (up to 20,000 cables in
224
+ total), so wiring something draws something. Past that they start unticked —
225
+ a hyperscale floor's first render should be the floor. `show=` on a `net`
226
+ line (or `on=`) settles it either way, and takes any spelling of yes or no —
227
+ `yes` `y` `on` `1` `true`, `no` `n` `off` `0` `false`. Anything else warns
228
+ and leaves the decision to the size rule.
229
+
230
+ Networks toggle on and off in the UI, and modest fabrics start on (see
231
+ above). Fabrics that run over the same pair of endpoints draw slightly
232
+ offset from one another, so every enabled net's colour stays visible.
233
+ Collapsed or zoomed-out regions merge their cables into one thicker line;
234
+ very dense views fade automatically.
235
+
236
+ ## The results file (`.tsv`)
237
+
238
+ One sample per line — `test target value [key=value …]` — separated by tabs,
239
+ commas or spaces. It is **append-only by design**: to add results from a new
240
+ test run, append lines. `cat run47.tsv >> results.tsv` is a fully supported
241
+ workflow.
242
+
243
+ Converting data from somewhere else into this format — by hand or by handing
244
+ the job to an AI — is written up in
245
+ [docs/converting-data-to-overlays.md](docs/converting-data-to-overlays.md):
246
+ the target-resolution rules, what each `!test` key does, and the mistakes that
247
+ produce a file which loads cleanly and paints nothing.
248
+
249
+ ```
250
+ temp_c DH1/A/R01/u05 61.2 run=nightly-01
251
+ iperf_gbps DH1/A/R01/u05 94.7
252
+ burnin DH1/A/R01/u05 PASS
253
+ ```
254
+
255
+ - Targets are element paths, but any **unique suffix** works (`A/R01/u05`,
256
+ or just a hostname if node ids are hostnames). Matching is case-insensitive.
257
+ A target that fits several elements goes to the first and the metric's card
258
+ says so — *N ambiguous targets*, naming each one and where its reading went.
259
+ Slot and role names repeat across racks (forty racks, forty `u01`s), so
260
+ write enough of the path to be unique when they do.
261
+ - Values may be numbers or words (`PASS`/`WARN`/`FAIL` get traffic-light
262
+ colors; other words get stable categorical colors).
263
+ - **How big can a results file be?** There is no limit in the viewer. A file
264
+ is read as one string, so the hard wall is the browser's maximum string
265
+ length — about 512 MB, past which `file.text()` throws. Measured on a
266
+ laptop-class browser: 5 MB (142k samples) loads in under a second, 25 MB in
267
+ ~3 s, 100 MB (2.8M samples) in ~12 s, 300 MB (8.5M samples) in ~34 s. Past
268
+ that, split the run across several files and load them together — they merge
269
+ exactly as appending would, and the panel groups them by file.
270
+ - The **same test + target may repeat freely** (many runs, many instances).
271
+ All samples are kept, and the UI reduces them with the aggregation you pick:
272
+ mean, median, min, max, sum, count, first, last, harmonic mean, geometric
273
+ mean, p95, p05, stdev, range. A metric of **verdicts** is not averaged and
274
+ offers no choice: the worst wins, so a failure under a collapsed rack stays
275
+ visible, and where nothing is worse than anything else the most common value
276
+ does. The card says so in place of the picker.
277
+ - Optional `!test` lines set display metadata:
278
+
279
+ ```
280
+ !test temp_c unit=C higher=bad min=18 max=78 short=TMP label="Inlet temp"
281
+ ```
282
+
283
+ ### Standardizing a metric
284
+
285
+ An overlay's colours normally span the smallest and largest value present, so
286
+ the same colour means different things on different metrics, and a floor where
287
+ everything is fine still paints something red. **standardize** on the overlay
288
+ card colours by the **z-score** instead — how far each value sits from that
289
+ metric's own mean, in standard deviations:
290
+
291
+ | Setting | Values shown | Colour from |
292
+ |---|---|---|
293
+ | `off` | the metric's own values | the min…max range (as before) |
294
+ | `colour by z-score` | the metric's own values | z, across ±σ |
295
+ | `values as z-score` | the z-score, in σ | z, across ±σ |
296
+
297
+ Use the first when the numbers matter and the colours should say "unusual for
298
+ this metric"; the second when comparing metrics in different units side by
299
+ side, where +2σ on temperature and +2σ on latency should look alike.
300
+
301
+ **standardize all**, above the cards, switches every metric at once. It
302
+ *overrides* the per-metric settings rather than rewriting them: each card goes
303
+ on showing (and still lets you edit) the setting it was given, greyed to say it
304
+ is not what is being drawn, and switching the override back off puts every
305
+ metric back on its own setting — including the ones you had deliberately left
306
+ raw. `off` there means "no override", not "force every metric raw". A metric
307
+ loaded while it is on is standardized too. The ramp's spread stays per metric,
308
+ since a shared one would have to overwrite what each card holds.
309
+
310
+ **one scale** — beside it, and on by default once anything is standardized —
311
+ is what makes two metrics actually comparable by eye. Spanning ±σ is not
312
+ enough on its own: a per-metric `palette=`, a per-metric spread, or a
313
+ `higher=good` inversion each paint the same z-score green on one metric and
314
+ red on the next. Ticked, every standardized metric is drawn from one palette,
315
+ one spread and no inversion, so **the same z-score is the same colour
316
+ everywhere**; each card still shows the palette and spread it would use on its
317
+ own, greyed. The default ramp is `rdbu`, diverging, because a z-score is
318
+ signed and the mean belongs in the middle. Untick it to go back to per-metric
319
+ colours.
320
+
321
+ The mean and spread are measured over **one aggregated value per measured
322
+ element** — the devices being compared, not the raw sample rows, which repeat
323
+ per run — so changing the aggregation re-measures them. The overlay card shows
324
+ what they came out as (`mean 40.5C ± 8.73C over 480`), the ramp ends default to
325
+ ±3σ and are adjustable, and a metric with no spread at all reads 0σ everywhere
326
+ rather than dividing by zero.
327
+
328
+ **A z-score says how unusual, never how much.** +2σ is 17 °C on one metric and
329
+ 0.4% on another, and sharing one scale across metrics is exactly what makes
330
+ that worth knowing. Three things say it:
331
+
332
+ - The legend carries **two rows**: `≤ -3σ · mean · ≥ +3σ` over what those three
333
+ points are worth here — `14.31C · 40.50C · 66.68C`.
334
+ - The inspector and the tooltip show **both numbers**: `38.8Gb/s -4.82σ`. The
335
+ floor plan still shows whichever single number the mode asks for, because a
336
+ slice is too narrow for two.
337
+ - Hovering the units row says what one σ is worth on this metric.
338
+
339
+ **Is σ a fair yardstick here?** A shared scale assumes one σ means the same
340
+ thing on every metric, which holds only while their distributions are a
341
+ similar shape — so each card says how much of its metric sits beyond ±2σ
342
+ against the 4.5% a normal distribution puts there. Close to it and the
343
+ comparison is sound. It is highlighted only when the tail is further from
344
+ normal than chance explains **at that sample size**: on twenty elements the
345
+ expected tail is 0.9, so one element either side doubles the percentage, and
346
+ a mark that fires on that is a mark you learn to ignore. A split population
347
+ (σ set by the gap, nothing in the tails) and a fat tail (σ set by the bulk,
348
+ too much outside it) are both caught once there are enough elements to tell.
349
+
350
+ **The ends are where the colour stops, not where the data stops.** Everything
351
+ past ±3σ paints the same colour, so an outlier at -4.8σ is indistinguishable
352
+ from one at -3.1σ — at exactly the extreme worth looking at. The card counts
353
+ what ran off (`20 past the ends, worst -4.82σ`), those elements carry a bar on
354
+ the edge they left by, and **fit** widens the range until nothing is clamped.
355
+ On a shared scale, fit reaches past the furthest point on *any* standardized
356
+ metric, since one range has to hold them all.
357
+
358
+ (`higher=bad|good` picks the green↔red ramp direction; `palette=` chooses any
359
+ ramp: viridis, magma, plasma, turbo, health, cool, ember, gray, rdbu;
360
+ `agg=` presets the aggregation; `decimals=` fixes formatting, 0 to 10 places.
361
+ `min=`/`max=` must be numbers with `min` below `max`; anything else is
362
+ reported in the load report and ignored rather than quietly applied.)
363
+
364
+ Fields split on tabs, commas or runs of spaces — except inside quotes, so a
365
+ value that needs a space is written `label="Inlet temp"` (single quotes work
366
+ too) and the quotes are not part of it.
367
+
368
+ ### `dcadd` — appending made even easier
369
+
370
+ Optional helper; plain `>>` works too. `tools/dcadd` runs it from a clone
371
+ with nothing installed; `pip install` puts it on `PATH` as `dcadd`.
372
+
373
+ ```sh
374
+ dcadd results.tsv temp_c DH1/A/R01/u05 61.2 run=nightly # one sample
375
+ my_test | dcadd results.tsv --stdin temp_c # target value per line
376
+ dcadd results.tsv --merge run1.tsv run2.tsv # concat other files
377
+ dcadd results.tsv --csv fio.csv --test iops --target host --value write_iops
378
+ dcadd results.tsv --meta temp_c unit=C higher=bad min=15 max=95 'label=Inlet temp'
379
+ ```
380
+
381
+ A metadata or `key=value` field whose value carries a space or a comma is
382
+ quoted on the way out, so `label=Inlet temp` writes `label="Inlet temp"` and
383
+ reads back whole. The format has no escape, so the quote used is the one the
384
+ value does not contain; a value holding both is refused rather than written
385
+ as something that reads back differently.
386
+
387
+ ### JSON results
388
+
389
+ Anything that starts with `{` or `[` is read as JSON instead — no flag, no
390
+ separate extension, and a `#` comment above it does not count. The overlays
391
+ that come out are identical to the text form's, so the two are
392
+ interchangeable and can be loaded together.
393
+
394
+ **NDJSON — one object per line — is the form to generate.** It keeps the
395
+ append-only property that makes `cat run47.ndjson >> results.ndjson` work,
396
+ which a top-level `[ ... ]` array would lose:
397
+
398
+ ```json
399
+ {"!test":"rtt_p50","unit":"us","higher":"bad","palette":"turbo"}
400
+ {"test":"rtt_p50","target":"wr12r06u15","value":184.2,"meta":{"peer":"wr12r06u16"}}
401
+ {"test":"burnin","target":"wr12r06u15","value":"PASS"}
402
+ ```
403
+
404
+ An object with `!test` is the JSON spelling of a `!test` line. Everything
405
+ else needs `test`, `target` and `value`; `meta` is optional and shows up in
406
+ the inspector. A number stays a number and a string that reads as one is
407
+ treated as numeric, so a value quoted by whatever generated the file behaves
408
+ the same as an unquoted one.
409
+
410
+ A whole document also works, for tools that would rather emit one value:
411
+
412
+ ```json
413
+ {"tests": {"rtt_p50": {"unit": "us", "higher": "bad"}},
414
+ "samples": [{"test": "rtt_p50", "target": "wr12r06u15", "value": 184.2}]}
415
+ ```
416
+
417
+ A bare `[ ... ]` array of samples is accepted too. Malformed lines are
418
+ reported with their line number rather than dropped, so a broken generator
419
+ shows up as a warning instead of an empty overlay.
420
+
421
+ ### `mx export` — matrix_orchestrator writes this format itself
422
+
423
+ [`matrix_orchestrator`](https://github.com/MartinGallagher-code/matrix_orchestrator)
424
+ needs no importer: it exports overlay samples directly, so there is nothing
425
+ in between to guess at its reports.
426
+
427
+ ```sh
428
+ mx run --for 120 # measure
429
+ mx export --window 120 >> results.tsv # colour the floor plan with it
430
+ ```
431
+
432
+ The numbers are the ones `mx summarize` prints, reduced by the run's own
433
+ rules — a blank cell is *not measured* and never zero, a layered run's rates
434
+ come from the host rows, latency is the worst peer's rather than a
435
+ percentile of percentiles. Those rules are not visible from outside a
436
+ `reports/` directory, which is why this direction is an export and not an
437
+ import.
438
+
439
+ #### What arrives on the floor plan
440
+
441
+ One sample per host per run, targeted at the host's name. Every overlay
442
+ carries its own units and palette direction, so the first render is already
443
+ readable.
444
+
445
+ | Overlay | Unit | What it is |
446
+ |---|---|---|
447
+ | `mx_pps` | pps | requests this host sent |
448
+ | `mx_rep_pps` | pps | replies it got back |
449
+ | `mx_served_pps` | pps | requests that *arrived* here from its peers — the receiver-side truth a sender cannot see |
450
+ | `mx_request_gbps` | Gb/s | its own requests on the wire, Ethernet/IP/UDP framing included |
451
+ | `mx_egress_gbps` | Gb/s | everything it puts on the wire: those requests plus the replies it owes the hosts that call it |
452
+ | `mx_rel_median` | % | its packet rate against the fleet's own median — 100% is "normal for this fabric" |
453
+ | `mx_line_util` | % | egress against the NIC's line rate (only with `mx export --nic-gbps`) |
454
+ | `mx_loss` | % | round-trip loss |
455
+ | `mx_forward_loss` | % | of what it sent, the share that never arrived |
456
+ | `mx_return_loss` | % | the share that arrived but whose reply never came back |
457
+ | `mx_achieved` | % | delivered rate against the matrix's target |
458
+ | `mx_coverage` | % | layered runs only: the share of its peers measured so far |
459
+ | `mx_rtt_avg` | µs | mean latency over its flows |
460
+ | `mx_rtt_p50` `mx_rtt_p99` `mx_rtt_max` | µs | latency of its **worst** peer |
461
+ | `mx_cpu` | % | the whole box, averaged over its cores |
462
+ | `mx_cpu_core` | % | its busiest single core |
463
+ | `mx_agent_cpu` | % | the busiest mx worker, as a share of *one* core — near 100% means mx itself is the ceiling |
464
+ | `mx_peers` | | flows this host sends |
465
+ | `mx_workers` | | agent worker processes, which is what makes `mx_agent_cpu` readable |
466
+ | `mx_intervals` | | report intervals it contributed to the window |
467
+ | `mx_state` | | `REPORTING`; `SILENT` for a host that reported earlier in the run but nothing inside the window; `NO-DATA` for one in the matrix that never reported at all — the reading a missing report cannot give you |
468
+
469
+ `mx export --peers` adds a per-flow overlay — `mx_peer_pps`, `mx_peer_loss`,
470
+ `mx_peer_rtt_p99` — one sample per flow, each tagged `peer=` (and `layer=`
471
+ on a layered run). They live under their own names so a `mean` over the
472
+ per-host overlays can never quietly include per-flow rows, and they ask for
473
+ `max` by default, which reads as *the worst peer of this host*.
474
+
475
+ **Rates you can read without knowing the hardware.** `mx_rel_median` is the
476
+ one to open first on an unfamiliar fleet: it puts every host against the
477
+ run's own median on a diverging ramp, so 100% is "normal here" and a slow
478
+ rack stands out whatever the absolute numbers are. It aggregates by
479
+ **median** deliberately — every host in a mesh talks to the sick host, so
480
+ `min` would redden the whole floor and hide it, while a host that is itself
481
+ slow has all of its flows slow. That is "I am slow" against "I have a slow
482
+ peer". (`iperf_rel_median` below is the same idea for throughput, and reads
483
+ the same way.)
484
+
485
+ What a relative overlay cannot see is a floor that is *uniformly* slow —
486
+ every host reads 100% of a median that is itself wrong. `mx export
487
+ --nic-gbps 25` fixes the scale to the hardware: it adds `mx_line_util` and
488
+ pins the throughput overlays absolutely, so half speed looks like half
489
+ speed.
490
+
491
+ **Every overlay arrives ready to read.** Units, palette direction, decimal
492
+ places, a 0-100 range pinned where the value really is a percentage of
493
+ something (auto-fitting makes a 30% CPU peak look alarming for no reason
494
+ but being the highest), and the aggregation that answers each overlay's own
495
+ question when a rack or room is collapsed: `max` for the worst peer's
496
+ latency and the busiest agent worker, `min` for coverage and intervals,
497
+ `median` for the two that diverge around 100%. All of it is overridable in
498
+ the overlay panel.
499
+
500
+ **An overlay is present only when its number was measured.** A host whose
501
+ receive side nobody reported gets no `mx_served_pps` and no
502
+ `mx_egress_gbps` — rather than a zero, which the viewer would average into
503
+ the rack and room above it — while `mx_request_gbps` is known from the
504
+ host's own rows and is always there. The loss split needs every peer's
505
+ receive rows, `mx_achieved` needs a paced matrix, and `mx_coverage` only
506
+ means anything on a layered run. Sparse overlays are normal here and are
507
+ the format working as intended.
508
+
509
+ **Reading `mx_rtt_p99`.** mx's latency histogram holds four buckets per
510
+ octave and a percentile reports its bucket's upper edge, so `mx_rtt_p99`
511
+ rounds *up* — by up to ~25%, and it can read a little above `mx_rtt_max`,
512
+ which is exact. That is a property of mx's report, not of the export;
513
+ `mx summarize` prints the same pair.
514
+
515
+ #### Making the names line up
516
+
517
+ Targets are the mx host names. The viewer resolves a bare name, a full
518
+ path, or any unique tail of one, so hosts named `wr12r06u15` in
519
+ `servers.txt` land on the right node with nothing else to do. A server list
520
+ of bare IPs will not resolve — the overlay panel shows them as *unmatched
521
+ targets* — so either name the hosts in `servers.txt` (`name=addr`) or map
522
+ them on the way out:
523
+
524
+ ```sh
525
+ mx export --names hosts.map --target-prefix DH1/A/ -o results.tsv
526
+ ```
527
+
528
+ #### The rest of the switches
529
+
530
+ `--raw` adds one sample per host per report *interval* for the columns a
531
+ host row carries, so the viewer can show min/max/p95 over a run rather than
532
+ the window's mean; the overlays derived from more than one row are still
533
+ written once per host. `--json` writes the same samples as NDJSON, one
534
+ object per line. `--window 0` reduces the whole report history instead of
535
+ the last 60 s. `--run LABEL` tags every sample `run=LABEL`, and
536
+ `--test-prefix` renames the overlays if `mx_` would collide with something
537
+ else in the same file.
538
+
539
+ ### `export-overlay` — iperf_orchestrator writes this format itself
540
+
541
+ [`iperf_orchestrator`](https://github.com/MartinGallagher-code/iperf_orchestrator)
542
+ 2.2+ needs no importer either. A mesh test answers "which host is slow"; this
543
+ floor plan answers "which rack", and the orchestrator exports the samples that
544
+ join them:
545
+
546
+ ```sh
547
+ iperf-orchestrator run # measure
548
+ iperf-orchestrator export-overlay # -> results/latest/iperf_overlay.tsv
549
+ iperf-orchestrator run --overlay # or as part of the pipeline
550
+ ```
551
+
552
+ **Throughput**
553
+
554
+ | Overlay | Per | What it is |
555
+ |---|---|---|
556
+ | `iperf_mbps_out` / `iperf_mbps_in` | direction | one test's rate, credited to the sender and to the receiver |
557
+ | `iperf_mbps_duplex` | host | what that host carried *at once*, both directions |
558
+ | `iperf_gbytes` | host | total data carried across the run |
559
+ | `iperf_line_util` | direction | rate as a % of the NIC's line rate (only with `--overlay-line-rate`) |
560
+ | `iperf_achieved` | direction | rate as a % of the `-b` target the run asked for |
561
+
562
+ **Relative — the overlays that say something a rate cannot**
563
+
564
+ | Overlay | Per | What it is |
565
+ |---|---|---|
566
+ | `iperf_rel_median` | direction | that direction against the run's own median, in % |
567
+ | `iperf_asymmetry` | pair | the gap between a pair's two directions, as a % of the faster one |
568
+
569
+ `iperf_rel_median` is the one to open first: 100% is "normal for this fabric",
570
+ 45% is half speed, and you need not know what good looks like on this hardware.
571
+ It arrives with a diverging palette pinned at 0–200% and aggregates by
572
+ **median**, which matters more than it sounds — on a full mesh every host talks
573
+ to the sick host, so every host's *worst* direction is the one to it, and a
574
+ `min` aggregation reddens the whole floor while hiding the host that is
575
+ actually slow. The median separates "I am slow" (all my directions are) from "I
576
+ have a slow peer" (one is). Switch it to `min` when you do want the worst link
577
+ anywhere. `iperf_asymmetry` is the shape a duplex mismatch, a one-way policer
578
+ or a congested return path makes, credited to both ends and aggregating by
579
+ `max`.
580
+
581
+ **Reliability**
582
+
583
+ | Overlay | Per | What it is |
584
+ |---|---|---|
585
+ | `iperf_status` | direction | `OK`; `FAIL` with the status, error text and log file to open; or `NO-DATA` |
586
+ | `iperf_fail_kind` | direction | the failures only, valued by why (`NO_SUMMARY`, `DIRECTION_MISSING`, …) |
587
+ | `iperf_state` | host | the roll call: `TESTED`, or `NO-DATA` for a host that never answered |
588
+ | `iperf_ok_pct` | host | success rate, the **worse** of the host's send and receive sides |
589
+ | `iperf_peers` | host | how many distinct peers it exchanged data with |
590
+ | `iperf_coverage` | host | those peers as a % of the ones it was *planned* to reach |
591
+ | `iperf_tests` | host | how many directed tests it took part in — sample count is confidence |
592
+
593
+ `iperf_state` is the roll call, and `NO-DATA` is a host that was in the run's
594
+ server list and produced no row at all — SSH refused, iperf2 missing, box down.
595
+ Without it that host has nothing to paint and reads here as "not part of this
596
+ test", which is the one reading that is certainly wrong; it comes with 0% on
597
+ `iperf_ok_pct` so it lands on a numeric overlay too. The roll call is a
598
+ per-host overlay kept apart from the per-direction `iperf_status` for the same
599
+ reason `mx export` keeps `mx_state` apart from its per-peer overlays: two
600
+ granularities in one overlay would reduce into each other. `iperf_ok_pct` reports the worse side
601
+ rather than the pooled rate because a host that receives fine and cannot send
602
+ anything is broken, not half-well — the `sent=`/`recv=` metadata names which
603
+ side failed.
604
+
605
+ **The host itself**
606
+
607
+ | Overlay | Per | What it is |
608
+ |---|---|---|
609
+ | `iperf_cpu_peak`, `_mean`, `_softirq`, `_sys`, `_user`, `_idle_floor` | host | from `cpu_summary.csv`; softirq and idle floor are per-core, and say which core |
610
+ | `iperf_bind_iface` | direction | which NIC the traffic rode, when the run used `--bind` |
611
+
612
+ Every overlay arrives with its unit, ramp direction, short name and — for the
613
+ percentages — its real `0–100` range, because an auto-fitted scale makes a 30%
614
+ CPU peak look alarming purely for being the highest number present. Sample
615
+ metadata carries the peer, the test's timestamp, and on a failure the error
616
+ text and log file; the header records the run id, its **mode** (a `parallel`
617
+ run is the whole fleet under load at once, `sequential-pair` is one link's
618
+ uncontended maximum — the numbers are not comparable) and the shape every
619
+ sample shared.
620
+
621
+ Two things are deliberately never invented. A direction that produced no number
622
+ is **never** exported as 0 Mb/s — zero is a measurement, and averaging it in
623
+ makes a broken link read as merely slow — so it leaves as a `FAIL` verdict and
624
+ pulls its host's coverage down instead. And `iperf_mbps_duplex` is not a plain
625
+ sum: parallel and sequential runs fire a round's flows together so those rates
626
+ genuinely add, while rolling mode probes one pair over and over and adding
627
+ *those* reports more than the NIC can carry. Rows are clustered by overlapping
628
+ test window, summed inside a cluster and averaged across clusters; when the CSV
629
+ carries no test windows the overlay is left out rather than guessed at.
630
+
631
+ **This export and `mx export` are built to the same rules**, so an `mx` run
632
+ and an iperf run can share one results file and read as one system:
633
+ `iperf_achieved` is `mx_achieved` against a target rate, `iperf_coverage` is
634
+ `mx_coverage`, `iperf_tests` is `mx_intervals`, `iperf_state` is `mx_state`,
635
+ both keep per-host and per-peer values in separate overlays, and both write
636
+ numbers to four significant digits in fixed notation — `%g` renders a host's
637
+ aggregate as `1.163e+06`, which is correct and unreadable in a file people
638
+ grep. `--overlay-test-prefix` (like mx's `--test-prefix`) namespaces every
639
+ overlay, so two runs exported with different prefixes load side by side for
640
+ comparison instead of averaging into each other.
641
+
642
+ One measured row becomes one sample, so the aggregation menu here does the
643
+ reducing (`mean` across peers, `max` the best, `min` the worst, `stdev` how
644
+ steady). Every sample carries `run=<run-id>`, so a nightly
645
+ `export-overlay --overlay-append` accumulates history in one file that `first`
646
+ and `last` read as then-and-now. `--overlay-map` and `--overlay-prefix` rename
647
+ hosts onto whatever the layout calls those nodes, and `--overlay-format ndjson`
648
+ writes NDJSON instead.
649
+
650
+ ### `dcimport` — netmesh output, directly
651
+
652
+ `dcadd --csv` already imports any CSV with a target column and a value
653
+ column. `dcimport` is for netmesh, whose output does not have that shape,
654
+ because what it measures is a **pair** — `(src, dst)` — while the viewer
655
+ paints **elements**.
656
+
657
+ ```sh
658
+ dcimport results.tsv --tidy reports/ # netmesh
659
+ tools/dcimport results.tsv --tidy reports/ # ... or straight from a clone
660
+ ```
661
+
662
+ | Source | What arrives |
663
+ |---|---|
664
+ | [`netmesh`](https://github.com/MartinGallagher-code/binnacle) `reports/` | `rtt_p50` `rtt_p99` `jitter` `loss` `path_mtu` per peer, `agent_cpu` per host |
665
+
666
+ **Nothing is averaged on the way in.** One measured row becomes one sample,
667
+ so the viewer's own aggregation menu does the reducing: `mean` reads as
668
+ "across peers and intervals", `max` as "the worst peer", `last` as "right
669
+ now". `--reduce` collapses to one sample per host per metric (median) for
670
+ meshes big enough that the raw row count matters.
671
+
672
+ A blank cell means "not measured" and is skipped rather than read as zero —
673
+ averaging a blank as 0 is the one mistake that quietly makes every one of these
674
+ numbers look better than it is.
675
+
676
+ `iperf_orchestrator` is not imported here either, for the same reason as `mx`:
677
+ it writes this format itself — see `export-overlay` above.
678
+ `tests/fixtures/iperf-overlay.tsv` is that export, kept as the contract the
679
+ suite checks.
680
+
681
+ Targets are whatever the tools called the hosts, so **generate the server
682
+ list from the layout and the names already match**. binnacle's `manifest`
683
+ reads this project's `.dc` format for exactly that:
684
+
685
+ ```sh
686
+ manifest floor.dc 'room[1]' | netmesh gen --servers -
687
+ netmesh run --for 60 && dcimport results.tsv --tidy reports/
688
+ ```
689
+
690
+ ## The viewer
691
+
692
+ - **Files** — the panel's **Open folder…** keeps a directory open beside the
693
+ canvas, instead of a dialog that shows one and forgets it. Layouts and
694
+ results are listed with their sizes (worth seeing before clicking a 300 MB
695
+ file); a click loads one — a `.dc` as the floor plan, a `.tsv` as overlays
696
+ added to what is already there — and a ✓ marks what is in. Subdirectories
697
+ open, the breadcrumb goes back up, `⟳` re-reads a folder that has gained a
698
+ file, and the name filter takes globs (`mx*.tsv`). Dropping a folder on the
699
+ window opens it here. In Chromium the folder and the path inside it come
700
+ back after a reload, behind one click for the permission the browser will
701
+ not keep; elsewhere it falls back to a directory input, which lists the same
702
+ tree but has to be chosen again each session. Nothing is read until it is
703
+ clicked, and clicking a results file that is already loaded re-reads it —
704
+ replacing its overlays rather than counting every sample twice, since the
705
+ format is append-only. A file is known by its path below the open folder, so
706
+ `monday/results.tsv` and `tuesday/results.tsv` are two files and stay two
707
+ sets of overlays; where a load genuinely cannot tell two files apart (two
708
+ named the same, dropped together, with no path between them) they are
709
+ numbered and the report says so.
710
+ - **Restart** — empties the viewer: no floor plan, no overlays, no filter, no
711
+ selection, and a blank canvas. **Remove all** in the Overlays panel only ever
712
+ cleared the overlays and left the floor plan drawn; this clears the lot. What
713
+ survives is the workspace rather than its contents — panel widths and folds,
714
+ and the folder held open in Files, so the next thing to load is one click
715
+ away.
716
+ - **The load report** — every load says what each file did, in a chip at the
717
+ right of the top bar (`✓ 3`, or `⚠ 1` when something did not go as asked).
718
+ Click it for the report; a load with a problem opens it by itself. It sits
719
+ in the top bar rather than a panel because a panel collapses, and the one
720
+ thing saying a file did not arrive must not be collapsible. It names the
721
+ quiet outcomes in particular: a file with no data lines in it, a file whose
722
+ lines are not in `test target value` form, **two layouts at once** (a viewer
723
+ holds one floor plan — it says which won and which were ignored), and a file
724
+ re-read over itself (it replaces what it brought before, rather than
725
+ counting its samples twice). Warnings inside a file name that file, so
726
+ `line 5:` is never ambiguous between two.
727
+ - **Panels** — either side panel collapses to a slim rail (the `‹` / `›` in
728
+ its heading, and the rail brings it back) and resizes by dragging the edge
729
+ beside the canvas; double-click that edge to reset a width. Every section
730
+ inside a panel — Files, Structure, About, Overlays, Networks, Inspector —
731
+ folds to its heading when the heading is clicked. Widths, collapsed panels
732
+ and folded sections are all remembered between visits. Sections are wired
733
+ from the markup, keyed by their heading, so one added later folds with no
734
+ extra code.
735
+ - **Zoom / pan** — wheel and drag (level-of-detail keeps hundreds of
736
+ thousands of elements smooth). `f` fits selection, `0` fits all. Labels grow
737
+ with the zoom — each is sized from its element's on-screen height — so
738
+ zooming in to read something makes it bigger, up to a ceiling.
739
+ - **Expand / collapse** — double-click any container, use the tree, or the
740
+ Collapse racks/rows/rooms buttons. Collapsed containers show their
741
+ aggregate results computed from all raw samples inside them.
742
+ - **Filter** — the top bar matches anything: bare words search ids, names,
743
+ tags and attributes, and a bare glob (`*serv*`, `r76?`) searches exactly the
744
+ same fields, plus the full path so `DH1/A/*` is a query; `+gpu` tags (globs
745
+ too: `+stor*`, `+gp?`);
746
+ `kind:rack`; `model=r76*` (`?` matches exactly one character);
747
+ `net:storage`; result queries like `temp_c>70`, `burnin=FAIL`,
748
+ `has:iperf_gbps` (a test name can be loaded from more than one file, and the
749
+ element matches when any of them reads over the threshold); `!` negates, `|` ors, space ands. Matches keep their
750
+ ancestors visible; "hide non-matching" prunes everything else, otherwise
751
+ non-matches are dimmed.
752
+ - **Overlays** — check any number of tests. With N enabled, every element is
753
+ split into N side-by-side slices, each colored by its test with the test's
754
+ short name and value printed on it (2, 3, 4, 5… all work). Per overlay you
755
+ pick the aggregation, palette, and value range live.
756
+ **Hide all** unticks every overlay without unloading it, and **Remove all**
757
+ drops them and their samples — both at the top of the panel, since a
758
+ results file can carry twenty-odd overlays. **standardize all** there
759
+ standardizes every metric at once, overriding each card's own setting
760
+ without overwriting it (see
761
+ [Standardizing a metric](#standardizing-a-metric)). Overlays are **grouped by the
762
+ file they came from**, and each group's header collapses it, so an mx export
763
+ and an iperf export loaded together stay tellable apart; the header counts
764
+ the group's overlays and how many are shown, and its **×** removes that
765
+ file's overlays alone. **sort A–Z** orders the metrics alphabetically within
766
+ each file; unticked they keep the order the file wrote them in, which the
767
+ exports choose deliberately (mx and iperf write theirs in reading order).
768
+ **Files never combine**: every overlay belongs to exactly one file, so two
769
+ files that both carry a test called `temp_c` are two overlays with two sets
770
+ of samples, two domains and two cards — one under each file's group. To
771
+ accumulate a metric over time, concatenate the runs into *one* file, which
772
+ is what the append-only format is for. Loading the same file again re-reads
773
+ it, replacing what it brought before rather than counting its samples twice.
774
+ - **Networks** — toggle each named fabric, or **Show all** / **Hide all** them
775
+ at once; opacity slider for dense views.
776
+ - **Measured flows** — `mx export --peers` and `iperf_orchestrator` write one
777
+ sample per *flow*, tagged `peer=`. Those overlays offer **draw measured
778
+ flows**, which paints each measured pair as a dashed curve coloured by its
779
+ own value, and the inspector lists a host's flows per peer (worst first)
780
+ rather than only the aggregate that hides them. `peer=wr01r01u02` in the
781
+ filter bar selects the hosts that measured a flow to that host, globs
782
+ included. **A flow is not a cable**: mx and iperf measure end to end, so a
783
+ flow between two servers in one rack really crossed server → ToR → server,
784
+ and neither tool can say how the traffic divided across the hops. For
785
+ per-cable numbers you need switch interface counters, which are a different
786
+ measurement entirely.
787
+ - **Inspector** — click an element for its tags (click a tag to filter by
788
+ it), attributes, U-slot, link counts, and all its readings. Cables hang off
789
+ the leaf devices, so a rack, row or room reports **links below** instead:
790
+ every cable in its subtree per fabric, split into the ones that stay inside
791
+ it and the ones that leave. **Show only this element's cables** then hides
792
+ every cable that neither starts nor ends inside the selection, at any level
793
+ — one server's two cables, or everything entering and leaving a room.
794
+ The elements at either end of the surviving cables are marked with a faint
795
+ wash and outline (a dot where they are too small to outline), so the far
796
+ end of a hairline is visible without tracing it.
797
+
798
+ ## Tests
799
+
800
+ ```sh
801
+ node tests/run.mjs # 836 assertions over the modules
802
+ node tests/browser.mjs # 55 more, driving the page in Chromium
803
+ ```
804
+
805
+ Both skip what they cannot run — `tests/run.mjs` needs python3 for the
806
+ `dcadd`/`dcimport` sections, `tests/browser.mjs` needs Playwright — so either
807
+ runs anywhere. **`--strict` turns every skip into a failure**, which is what CI
808
+ passes: a green run that quietly tested nothing is indistinguishable from a
809
+ green run that tested everything, and that is the one result a test suite must
810
+ never give.
811
+
812
+ GitHub Actions runs both on every push and pull request, plus a third job that
813
+ builds the Python package, installs the wheel into a clean environment and
814
+ fetches a page from the server it provides — the wheel's layout is not the
815
+ checkout's, so nothing else here would notice a package that installs and then
816
+ serves nothing. Three jobs, so a red mark says which layer broke.
817
+
818
+ ## Repository layout
819
+
820
+ ```
821
+ index.html, css/, js/ the viewer (ES modules, no dependencies)
822
+ examples/small.dc starter layout (~1,200 elements)
823
+ examples/small-results.tsv two nightly runs of four tests
824
+ examples/mega.dc scale test (~256k elements on one page)
825
+ examples/hostnames.dc flat hostname naming (wr12r06u15 style)
826
+ examples/iperf/ a floor plan using every layout feature, with a real
827
+ export-overlay run painted over it (see its README)
828
+ examples/hostnames-results.tsv results addressed by flat name
829
+ examples/mx/ every layout construct, painted by a real mx run
830
+ js/version.js the project's version; python/dcviz/__init__.py
831
+ carries the other half and tests/run.mjs pins them
832
+ python/dcviz/ the Python side: dcadd, dcimport and `dcviz serve`,
833
+ which is what `pip install` ships. Stdlib only.
834
+ tools/dcadd, tools/dcimport
835
+ two-line shims that run those from a clone with
836
+ nothing installed, so the copy that ships and the
837
+ copy that runs are one file
838
+ pyproject.toml packaging (hatchling; no runtime dependencies)
839
+ CHANGELOG.md what changed, per version
840
+ docs/releasing.md how a release is cut, and the one manual PyPI step
841
+ docs/ the results-format guide for converting data in
842
+ tests/fixtures/ real tool output, as the contract the suite checks
843
+ tests/run.mjs headless test suite (node tests/run.mjs)
844
+ tests/browser.mjs the same for the page itself (node tests/browser.mjs) —
845
+ drives Chromium through the interactions that module
846
+ tests cannot reach. Skips with a message where
847
+ Playwright is not installed; the viewer still has no
848
+ dependencies.
849
+ .github/workflows/ both suites plus a package build on every push and
850
+ pull request; release.yml on a v* tag
851
+ LICENSE GNU General Public License v3
852
+ ```
853
+
854
+ ## License
855
+
856
+ Copyright © 2026 Martin J. Gallagher.
857
+
858
+ This program is free software: you can redistribute it and/or modify it under
859
+ the terms of the [GNU General Public License](LICENSE) as published by the Free
860
+ Software Foundation, either version 3 of the License, or (at your option) any
861
+ later version.
862
+
863
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY
864
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
865
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
866
+
867
+ You should have received a copy of the GNU General Public License along with
868
+ this program. If not, see <https://www.gnu.org/licenses/>.