Skip to content

ENH: add terminal output to bx view --cli and improve bx series / bx history (do not merge) - #165

Closed
rok wants to merge 1 commit into
benchx-dev:mainfrom
rok:cli-views-and-history
Closed

rok wants to merge 1 commit into
benchx-dev:mainfrom
rok:cli-views-and-history

Conversation

@rok

@rok rok commented Nov 27, 2026

Copy link
Copy Markdown
Member

Summary

Adds terminal rendering for the derived view marts already computed by benchx.views.marts, and improves bx series and bx history ergonomics while staying strictly within the component boundaries in docs/design/system-decomposition.md:

  • bx view --cli [changes|movers|latest|commits] (Views, §3.9):
    • Factors input loading + build_marts into views.load_marts(...) so HTML and terminal views share one pipeline (and work Arrow-free on JSONL stores / --results).
    • Adds src/benchx/views/text.py to render changes, movers, latest, and commits tables to stdout (with --commit REF, --workload REGEX, -n/--limit, and --json).
    • Explicitly labels changes and movers as heuristic relative changes (not comparator verdicts; formal cross-run/history verdicts belong in bx compare, cf. How to compare two runs (bx compare in read mode) #160).
  • bx series (Store query, §3.1):
    • Defaults to measurands only (hiding condition series such as load-average, matching bx head --table); adds --all to include condition series (explicit --quantity load-average still works without --all).
    • Displays benchmark parameters via projection.workload_label so parametrized series are distinguishable.
  • bx history (Store query, §3.1; benchmark-result-schema.md §4.1):
    • Adds --repo DIR (defaulting to the project root checkout) to order revision-axis points by git ancestry + committer date when git commit metadata is available, falling back to measurement start otherwise.

Example

$ bx view --cli
changes (heuristic; not a comparator verdict — use `bx compare` for verdicts)
commit              case           before  after   change
2c5f97aa->a436bddf  BM_Noisy/1024  1.85ms  1.70ms   -7.81%
2c5f97aa->a436bddf  BM_Quiet/1024  1.00ms  1.20ms  +20.11%

Testing

  • Added tests/test_cli_views.py covering bx view --cli (all 4 views, filters, --json, flag conflict refusals, JSONL/Arrow-free and Parquet stores), bx series measurand default + parameter display + --all, and bx history --repo git-ancestry ordering.
  • Full test suite passed locally (1104 passed, 18 skipped; 2 loopback HTTP server tests deselected due to local sandbox).

@rok rok changed the title ENH: add terminal output to bx view --cli and improve bx series / bx history ENH: add terminal output to bx view --cli and improve bx series / bx history (do not merge) Nov 27, 2026
@rok

rok commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

Sprinting with Joris we noticed there's no straightforward cli way to see performance changes locally. View is probably the wrong cli location to put this under and I'll probably close it soon.

@ev-br

ev-br commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Try --table for the asv style tables?

@rok

rok commented Nov 27, 2026

Copy link
Copy Markdown
Member Author

@ev-br with which command though? bx compare?

@ev-br

ev-br commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

bx head --table, bx compare --tables (plural)

@rok

rok commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

This was more for demonstration purpose, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants