Skip to content

Commit 869f0be

Browse files
authored
Merge pull request #137 from rok/views-redesign
ENH: light-first ASV-minimalist redesign of `bx view` dashboard
2 parents be002d5 + 1537fea commit 869f0be

5 files changed

Lines changed: 1932 additions & 632 deletions

File tree

‎docs/benchx.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,9 @@ outside the checkout is identified by one file): put it inside the checkout.
350350
with `run.parquet` and `results.parquet`). With no `--out`, `bx view` builds into a temporary
351351
directory and serves the bundled static dashboard over local HTTP until Ctrl-C; with `--out DIR`,
352352
it writes a deployable static site (and optional Parquet marts under `data/` when `pyarrow` is
353-
installed, unless `--no-marts`).
353+
installed, unless `--no-marts`). Series are keyed by `(suite, case, params, quantity, node)`
354+
for per-commit revision history; cross-environment comparisons on the same commit and host are
355+
inspected via `bx compare --profile environments`.
354356

355357
**Stopping a run.** Ctrl-C stops the benchmarks `bx` started, within about a second; pyperf gets the Ctrl-C and stops its worker.
356358
A second Ctrl-C does not wait. Results already stored

‎src/benchx/views/inputs.py‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,28 @@ def _canonical_params(value) -> str:
191191
return str(value)
192192

193193

194+
def _normalize_suite_name(raw: str) -> str:
195+
text = str(raw).replace("\\", "/").strip()
196+
if not text:
197+
return "default"
198+
# Preserve relative Python script paths (e.g. benchmarks/a/bench.py) so nested
199+
# suites sharing a filename do not collide, while stripping directory prefixes
200+
# from absolute paths and compiled binary paths (e.g. release/arrow-foo-benchmark).
201+
if not text.startswith("/") and not (len(text) >= 2 and text[1] == ":") and text.endswith(".py"):
202+
return text.removeprefix("./") or "default"
203+
return text.rsplit("/", 1)[-1] or "default"
204+
205+
194206
def _extract_suite(work_order: dict, doc_or_row: dict) -> str:
195207
suites = work_order.get("suites") if isinstance(work_order, dict) else None
196208
if isinstance(suites, list) and suites:
197209
first = suites[0]
198210
if isinstance(first, dict) and first.get("suite"):
199-
return str(first["suite"]).rsplit("/", 1)[-1]
211+
return _normalize_suite_name(first["suite"])
200212
provenance = doc_or_row.get("provenance") or {}
201213
info = _parse_json_obj(provenance.get("info"))
202214
if info.get("suite"):
203-
return str(info["suite"]).rsplit("/", 1)[-1]
215+
return _normalize_suite_name(info["suite"])
204216
return "default"
205217

206218

0 commit comments

Comments
 (0)