Files
zen/benchmark/rust/Cargo.toml
stefan-gorules e3d32a210d feat: trace format lane (#573)
* feat(trace): trace format v1 with TraceCollector on the compiled engine

Adds trace format v1 to the compiled engine, recorded by explicit trace
recorders and written natively. The interpreted engine keeps the legacy
trace.

- EvaluationOptions.trace is a TraceFormat (off, v1, legacy). Legacy
  traces are produced directly from the same recording.
- zen_engine::trace exposes convert, restore and inspect for
  stored documents, with redaction and truncation markers.
- The trace header takes evaluatedAt, timezone and seed from the
  evaluation context, so an evaluation replays from its own trace.
- Batch and columnar evaluations record events as columns and write one
  document per row.
- Bindings accept the trace format (true, 'v1', 'legacy'); the Node
  binding ships TypeScript types for the v1 document.
- Golden, fixture and damaged-document tests cover byte identity with the
  legacy trace, restore, interop with the reference fixtures and
  malformed input.

* perf(trace): build columnar request rows once with precomputed paths

* perf(trace): write a node's edits from its written columns

* perf(trace): capture node columns instead of row values in the columnar plan

* perf(trace): reuse a node's rendered body for rows with the same rule and cell values

* perf(trace): size the batch trace buffer up front, key node bodies on typed column words, share request rows as the input

* perf(trace): read the request from input columns and build request rows only on demand

* perf(trace): key node bodies on per-column codes and precompute node heads and result labels

* perf(trace): keep first-hit table facts and their referenced fields as columns

* perf(trace): write per-row expression results in the batch writer

* perf(columnar): write result rows as JSON straight from output columns

* perf(trace): keep collect-policy rule hits as columns and reuse hit text

* perf(trace): pack loop results from columns and resolve result column accessors once per batch

* perf(trace): share row-wise node outputs with the trace when nothing can alias them

* perf(trace): pack lists without a string per distinct item

* perf(trace): write new lists from columns and decide references by where a list came from

* perf(trace): write wide list items from columns while the list has never been built

* perf(trace): read list cells once while rendering

* feat(trace): list table inputs once per node and key rule cells by column id

* feat(trace): name matched policy table rows by rule id

* feat(trace): store loop results as one column per key

* build: optimise test builds
2026-11-21 13:38:43 +01:00

20 lines
505 B
TOML

[package]
name = "zen-benchmark"
version = "0.0.23"
edition = "2021"
publish = false
[dependencies]
zen-engine = { path = "../../core/engine" }
zen-expression = { path = "../../core/expression" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
rust_decimal = { workspace = true }
zstd = "0.13"
mimalloc = { version = "0.1.52", optional = true }
[features]
base = []
mimalloc = ["dep:mimalloc"]