From 9ba2dc384e9e1a994f97b5951a3c2fdbc3c4429a Mon Sep 17 00:00:00 2001 From: ev-br's Claude Code Agent Date: Sun, 1 Nov 2026 16:36:57 +0000 Subject: [PATCH 1/2] MAINT: make demo.sh runnable and move it to examples/archery-compare prototype/demo.sh was committed with mode 100644, so the `./demo.sh` that the README shows failed with "Permission denied". It is now executable. It moves to examples/archery-compare/run.sh, next to the other examples' run.sh. The directory takes over the old examples/demo, the demo's project root with its benchx.conf.json and its git-ignored store, so the script finds its project file and the sibling examples/demo-suite relative to itself and can be started from any directory. The README, the archery-local README and prototype-design.md name the new paths. The project name `demo` in the store is unchanged. Co-Authored-By: Claude Sonnet 5.5 --- docs/design/prototype-design.md | 2 +- prototype/README.md | 12 ++++++------ .../examples/{demo => archery-compare}/.gitignore | 0 .../{demo => archery-compare}/benchx.conf.json | 0 .../{demo.sh => examples/archery-compare/run.sh} | 15 ++++++++------- prototype/examples/archery-local/README.md | 7 ++++--- 6 files changed, 19 insertions(+), 17 deletions(-) rename prototype/examples/{demo => archery-compare}/.gitignore (100%) rename prototype/examples/{demo => archery-compare}/benchx.conf.json (100%) rename prototype/{demo.sh => examples/archery-compare/run.sh} (93%) mode change 100644 => 100755 diff --git a/docs/design/prototype-design.md b/docs/design/prototype-design.md index 6ae9b60..b7776fc 100644 --- a/docs/design/prototype-design.md +++ b/docs/design/prototype-design.md @@ -543,7 +543,7 @@ re-ingested to show idempotency, and compared again with `--results`; that document must equal the one from the local store (criterion 8). Every `bx run` delivers to the local store, so both shapes' results land in -the demo project's store (`prototype/examples/demo/store.parquet`), the ad hoc ones as thin results of project +the demo project's store (`prototype/examples/archery-compare/store.parquet`), the ad hoc ones as thin results of project `local/`. Run keys carry a timestamp, so successive demo runs add rows rather than colliding on `ingest_key`. The store and each series' history grow from run to run, and the demo ends with `bx head`. diff --git a/prototype/README.md b/prototype/README.md index 1b58136..4724a19 100644 --- a/prototype/README.md +++ b/prototype/README.md @@ -174,10 +174,10 @@ every result is pyperf. Results also record the installed project's version ```console $ uv venv && uv pip install -e '.[test]' # editable: schemas are read from ../schemas $ .venv/bin/python -m pytest tests # 344 tests, fake Google Benchmark binary, no compiler -$ ./demo.sh # real builds; needs cmake, a C++ compiler, network once +$ examples/archery-compare/run.sh # real builds; needs cmake, a C++ compiler, network once ``` -`demo.sh` prints every command before running it, as you would type it +`examples/archery-compare/run.sh` prints every command before running it, as you would type it (`bx` for `.venv/bin/python -m benchx.cli`, `$WORK` for its scratch directory), so it doubles as a walkthrough. It prepares a git source with two commits and three CMake build directories of `examples/demo-suite` (base, @@ -194,14 +194,14 @@ part, then: persistent one, lists series and history, and ends with `bx head`. Every `bx run` and every measure-mode `bx compare` delivers to the local store, so each demo run adds its -results, ad hoc and tracked, to `examples/demo/store.parquet` (the demo's project root, set +results, ad hoc and tracked, to `examples/archery-compare/store.parquet` (the demo's project root, set in its `benchx.conf.json`). Run keys carry a timestamp, so runs accumulate and each series' history grows. Look at it any time: ```console -$ (cd examples/demo && ../../.venv/bin/python -m benchx.cli head -n 20) -$ rm examples/demo/store.parquet # start over +$ (cd examples/archery-compare && ../../.venv/bin/python -m benchx.cli head -n 20) +$ rm examples/archery-compare/store.parquet # start over ``` Both changes add two to three percent of work. The quiet benchmark flags them @@ -237,7 +237,7 @@ benchx/ cli.py bx (compare has a read mode and a measure mode) ../schemas/ the result and work-order schemas, read in place ($BENCHX_SCHEMAS overrides) examples/demo-suite a two-benchmark Google Benchmark suite for the demo -examples/demo the demo's project root: its benchx.conf.json, and its persistent store +examples/archery-compare the demo: run.sh, its project root's benchx.conf.json, and its persistent store examples/pyperf-bench Python functions under `bx bench` (own README) examples/archery-local an end-to-end, Arrow-local-shaped example with a target provider (own README) tests/ test_prototype.py: the success criteria and the runner and store diff --git a/prototype/examples/demo/.gitignore b/prototype/examples/archery-compare/.gitignore similarity index 100% rename from prototype/examples/demo/.gitignore rename to prototype/examples/archery-compare/.gitignore diff --git a/prototype/examples/demo/benchx.conf.json b/prototype/examples/archery-compare/benchx.conf.json similarity index 100% rename from prototype/examples/demo/benchx.conf.json rename to prototype/examples/archery-compare/benchx.conf.json diff --git a/prototype/demo.sh b/prototype/examples/archery-compare/run.sh old mode 100644 new mode 100755 similarity index 93% rename from prototype/demo.sh rename to prototype/examples/archery-compare/run.sh index ed46383..1947381 --- a/prototype/demo.sh +++ b/prototype/examples/archery-compare/run.sh @@ -15,17 +15,18 @@ # Google Benchmark unless it is installed. ROUNDS=5 by default. # # `bx compare` (measure mode) and `bx run` deliver every result to the one local store, -# examples/demo/store.parquet (paths.store in examples/demo/benchx.conf.json, the demo's -# project file, from whose directory every `bx` command runs), so the store and -# each series' history grow from run to run. `bx head` shows the latest rows -# at any time. Delete the file to start over. +# examples/archery-compare/store.parquet (paths.store in +# examples/archery-compare/benchx.conf.json, the demo's project file, from whose +# directory every `bx` command runs), so the store and each series' history grow +# from run to run. `bx head` shows the latest rows at any time. Delete the file +# to start over. set -euo pipefail cd "$(dirname "$0")" -PROTOTYPE=$PWD +DEMO_ROOT=$PWD +PROTOTYPE=$(cd ../.. && pwd) PYTHON=${PYTHON:-$PROTOTYPE/.venv/bin/python} ROUNDS=${ROUNDS:-5} WORK=$(mktemp -d) -DEMO_ROOT=$PROTOTYPE/examples/demo STORE=$DEMO_ROOT/store.parquet STAMP=$(date -u +%Y%m%dT%H%M%SZ) # run keys are unique per demo run, so runs accumulate RUN_REV="rev-adhoc-$STAMP" @@ -59,7 +60,7 @@ into() { # into : run with stdout to a file, printed with its re printf '\033[36m$ WORK=%s\033[0m\n' "$WORK" >&2 step "user: a source with two commits, a worktree at each" -show cp -R examples/demo-suite "$WORK/src" +show cp -R ../demo-suite "$WORK/src" show git -C "$WORK/src" init -q show git -C "$WORK/src" add -A show git -C "$WORK/src" commit -qm "base" diff --git a/prototype/examples/archery-local/README.md b/prototype/examples/archery-local/README.md index dfbbe50..cbac463 100644 --- a/prototype/examples/archery-local/README.md +++ b/prototype/examples/archery-local/README.md @@ -136,6 +136,7 @@ The documents involved are in `../../../schemas/`: `target-provider-request`, The provider here builds one source tree, `WORKSPACE`. Comparing against a tag or a past revision (`@plain=v1.0`) is the provider's business and is not -implemented in this example; the prototype's own `demo.sh` shows revisions -with two prebuilt worktrees. A declared `build` object in a description is -refused by the prototype's runner (it reads `CMakeCache.txt` instead). +implemented in this example; the prototype's own +`examples/archery-compare/run.sh` shows revisions with two prebuilt worktrees. +A declared `build` object in a description is refused by the prototype's +runner (it reads `CMakeCache.txt` instead). From 9e8afe98ba57322318416754969ac1a669516934 Mon Sep 17 00:00:00 2001 From: ev-br's Claude Code Agent Date: Sun, 1 Nov 2026 16:36:57 +0000 Subject: [PATCH 2/2] CI: run the archery-compare example Add a step after the archery-local example, with the same toolchain needs (cmake, a C++ compiler, network for Google Benchmark), so it is skipped on Windows. ROUNDS=2 keeps the job to about a minute and a half; it lowers the number of samples, not what the script exercises. The script is run directly, as the README shows it, so a lost executable bit fails here too. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/tests.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2727c71..2b22b8c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,3 +61,17 @@ jobs: if: runner.os != 'Windows' shell: bash run: uv run --extra test --python ${{ matrix.python-version }} bash examples/archery-local/run.sh + + # The end-to-end demo of both profiles: builds a small CMake project three + # ways, then measures and compares it. Needs cmake and a C++ compiler + # (preinstalled on the Linux and macOS runners) and network access to fetch + # Google Benchmark. ROUNDS is lowered from the default of 5 to keep the job + # short; it changes how many samples are taken, not what the script exercises. + # Run directly, the way the README shows it, so a lost executable bit + # fails here too. + - name: Run the archery-compare example + if: runner.os != 'Windows' + shell: bash + env: + ROUNDS: "2" + run: uv run --extra test --python ${{ matrix.python-version }} examples/archery-compare/run.sh