Files
zen/.github/workflows/benchmark.yaml
stefan-gorules 1944ebe01f fix: table analysis memory (#570)
* fix(engine): keep decision table analysis memory and time in proportion to the table

Schema queries no longer run table verification; graph table checks are deferred to diagnostics.

Gap search and unreachable-rule cover run on per-dimension bitsets when the table is small enough to index densely, and on the set-based path otherwise. Missing cases are merged on interned ids and rendered lazily.

Compression works on borrowed rows and interned cell ids, assigned once per round. Small string sets are held inline or as a sorted list instead of a tree.

Findings are unchanged: the previous implementations stay as test-only references and are compared on generated tables, and tests/table_scaling.rs bounds peak memory with a counting allocator.

* fix(nodejs): accept bytes and JSON text in Workspace setDocument, setPolicy and enhanceGraphTrace

Documents with more than one million JSON values were rejected by the object conversion limit, which a two-column decision table reaches at 250,000 rows. Buffers and strings are parsed directly, and objects are converted without that limit.

* ci: pin Rust to 1.99.0

Rust 1.100 passes one -L dependency directory per dependency, which pushes the rustc command for zen-engine past the Windows command-line limit when sccache spawns it (os error 206). Every workflow that installed stable now installs 1.99.0; miri stays on nightly.

* ci: pin the UniFFI native build to Rust 1.99.0

actions-rust-cross installs its own toolchain and defaults to stable, so the Windows and macOS UniFFI builds were still on 1.100.
2026-11-19 16:06:29 +01:00

131 lines
3.7 KiB
YAML

name: Benchmark
on:
push:
tags:
- 'zen-engine-v*'
- '!zen-engine-v*-beta*'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
env:
BENCH_ITERS: '500'
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.99.0 --profile minimal
rustup default 1.99.0
- uses: ./.github/actions/setup-rust
with:
shared-key: benchmark-rust
sccache: 'false'
- name: Build
run: cargo build --release -p zen-benchmark
- name: Run
run: ./target/release/zen-benchmark benchmark/manifest.json "$GITHUB_WORKSPACE/bench-rust.json"
- uses: actions/upload-artifact@v4
with:
name: bench-rust
path: bench-rust.json
if-no-files-found: error
node:
runs-on: ubuntu-latest
defaults:
run:
working-directory: bindings/nodejs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
cache: yarn
cache-dependency-path: 'bindings/nodejs/yarn.lock'
- name: Install Rust
uses: dtolnay/rust-toolchain@1.99.0
with:
toolchain: 1.99.0
targets: x86_64-unknown-linux-gnu
- uses: ./.github/actions/setup-rust
with:
shared-key: benchmark-node
sccache: 'false'
- run: yarn install --immutable --mode=skip-build
- run: yarn build
- name: Run
working-directory: ${{ github.workspace }}
run: node benchmark/node/bench.mjs "$GITHUB_WORKSPACE/bench-node.json"
- uses: actions/upload-artifact@v4
with:
name: bench-node
path: bench-node.json
if-no-files-found: error
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install Rust
run: |
rustup toolchain install 1.99.0 --profile minimal
rustup default 1.99.0
- uses: ./.github/actions/setup-rust
with:
shared-key: benchmark-python
sccache: 'false'
- run: pip install maturin
- name: Build + install wheel
run: |
maturin build --release --out dist -m bindings/python/Cargo.toml
pip install dist/*.whl
- name: Run
run: python benchmark/python/bench.py "$GITHUB_WORKSPACE/bench-python.json"
- uses: actions/upload-artifact@v4
with:
name: bench-python
path: bench-python.json
if-no-files-found: error
publish:
runs-on: ubuntu-latest
needs: [ rust, node, python ]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
path: results
merge-multiple: true
- name: Merge results
run: |
node -e '
const fs = require("fs");
const out = [];
for (const lang of ["rust", "node", "python"]) {
const r = JSON.parse(fs.readFileSync(`results/bench-${lang}.json`, "utf8"));
for (const e of r) out.push({ ...e, name: `${lang} · ${e.name}` });
}
fs.writeFileSync("bench-all.json", JSON.stringify(out, null, 2));
'
- name: Store + publish
uses: benchmark-action/github-action-benchmark@v1
with:
name: ZEN cross-language
tool: customSmallerIsBetter
output-file-path: bench-all.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '150%'
comment-on-alert: true
fail-on-alert: false