diff --git a/CHANGELOG.md b/CHANGELOG.md index 85977eddd9..32a586bb96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Performance +- **Resolve expression keyword literals once per operator** (#774). `=` and `!=` reuse a literal keyword's entity UUID across input rows, including nested expressions, rule bodies and prepared slots. The cache contains only literals from that expression and is discarded with the operator; dynamic operands retain the existing comparison semantics. No API, dependency or file-format change. See the [measurements](docs/benchmarks/774-expression-keywords.md). + - **Avoid whole-attribute reads for selective in-memory ancestors** (#723). Eligible three-pattern recursive delta runs can start from a small derived relation and probe stored facts by entity, preserving the same semi-naive ranges and answers. The choice is reconsidered each round using bounded pending-index counts. Populated committed generations retain AVET value probes; general value joins retain their existing behavior. No persistent index, dependency, API or format change. The approved v3 binary-size budget increases from 1,230 to 1,234 KiB for this change. - **Skip sorting proven ordered input** (#641, first slice). Plain queries can omit `Sort` when a committed integer, float, or Boolean range already provides the complete ascending result order. Attribute scans use AVET; entity-and-attribute scans retain their selective EAVT range. `:offset` and `:limit` then stop reading early, so memory-limit (`QRY-012`) or I/O errors in unread later input may be avoided. The proof uses the query's pinned reader, including a large write transaction's working trees, and rejects pending or staged records in the source range, mixed kinds, unsupported comparators, tie suffixes, order-changing operators, user callbacks and `collect-set`. Unproven queries retain their original plan. diff --git a/CLAUDE.md b/CLAUDE.md index 6bb73a19a1..6a4dc20228 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -218,7 +218,7 @@ Auto-migrates v7 → v8 on open (spec §9, with a backup meta page). v1–v6 are ## Test Coverage -**2005 tests** (1988 passing, 17 ignored; unit + integration + doc). Engine answers once checked by the executor are frozen in `tests/answers/` (#551). +**2006 tests** (1989 passing, 17 ignored; unit + integration + doc). Engine answers once checked by the executor are frozen in `tests/answers/` (#551). See `docs/TEST_COVERAGE.md` for the full per-file breakdown. The #760 deterministic storage suite adds three native unit tests in a separate `--cfg minigraf_shuttle` build, outside the default count. Run only `graph::storage::deterministic::` with that cfg; ordinary unit tests do not enter its scheduler. `deterministic-schedules.yml` runs relevant v3 PRs on Linux/macOS/Windows plus Linux MSRV, and larger nightly/manual searches with replay artifacts. The identical main workflow activates the v3 schedule after both PRs merge. See `docs/testing/deterministic-schedules.md` for scope, controls and findings. @@ -227,6 +227,8 @@ The #760 deterministic storage suite adds three native unit tests in a separate ## Current Maintainer Context +On `v3`, expression `=` / `!=` resolves literal keywords once per operator (#774), including nested expressions and substituted prepared slots. Dynamic values do not populate the cache. This is a performance-only change, with no v2.x backport; see `docs/benchmarks/774-expression-keywords.md`. + **v2.0.5 released** (2026-10-11) — short-file open refused with STG-045 (#506), commit after a torn WAL entry no longer lost, WAL-007 (#513); backported rule-query `max_results` (#528), all-checkpointed WAL removal (#457) and `usize::MAX` close-time save (#476); weekly soak test (#392), real coverage gates (#396). **v2.0.4** (2026-10-08) — `BrowserDb` IndexedDB flush returns an error for an unreadable dirty page (#470); golden-file v7 corpus (#391) and SIGKILL committed-data crash test (#384). **v2.0.3** (2026-10-06) — data-integrity patch under the support policy: indexed queries with >65,535 uncheckpointed facts (#445), tx counter rewound on reopen next to an already-checkpointed WAL (#447). **v2.0.2** (2026-09-27) — last planned v2.x feature/fix release: query fixes (#297, #405, #407, #410), directory fsync (#389), point-query/attribute-scan/checkpoint perf mitigations (#323, #381, #315), CI policy checks (#395), support policy and tiers (#397, #399, #400). **v2.0.1** (2026-09-25) fixed index rebuild on open (#370). **v2.0.0** introduced kernel file locking (#317, #304), structured runtime error codes (#277), `OpenOptions` `#[non_exhaustive]`, and an MSRV of Rust 1.89. See `CHANGELOG.md` for the full rationale and release history. Current plan (see `ROADMAP.md` and the milestones): diff --git a/README.md b/README.md index eff8967407..a5bb68eb1c 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ On the unreleased v3 branch, selective in-memory ancestor queries can use entity **Status**: See [ROADMAP.md](ROADMAP.md) for planned work and current direction. +The unreleased v3 branch also avoids resolving the same keyword literal on every row of an expression comparison such as `[(= ?entity :alice)]` (#774); see the [benchmark report](docs/benchmarks/774-expression-keywords.md). + ## Why Datalog? **Datalog is fundamentally better for graphs than SQL-like languages:** diff --git a/ROADMAP.md b/ROADMAP.md index f15682f02c..3a2a0e6838 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -125,6 +125,7 @@ Scope — release-gate testing and documentation: - Fault injection across save/WAL/recovery (#390) - Long-running soak test at scale (#392; done on `v3`: `tests/soak_test.rs`, 10M facts and a 5-hour churn weekly, alternating `main` and `v3`) - Benchmarks at 100K–10M facts and a published performance envelope (#394; on `v3`: `examples/perf_envelope.rs`, results in `docs/BENCHMARKS.md`; follow-ups #528–#532, with #532 superseded by #551's removal of repeated committed-fact net-assert; [audit and measurements](docs/benchmarks/532-net-assert-audit.md)) +- Expression keyword/ref equality (#774; on `v3`): resolve literal keywords once per operator, with memory bounded by the expression. [Measurements and regression coverage](docs/benchmarks/774-expression-keywords.md); performance-only, with no v2.x backport. - Higher storage/WAL coverage gates and branch-coverage gates (#396; on `v3`: line and branch floors per file in `coverage-thresholds.toml`, checked on every PR) - Durability, recovery and operations guide (#398; done on `v3`: `docs/DURABILITY.md`, also on the docs site; found #535) diff --git a/docs/BENCHMARKS.md b/docs/BENCHMARKS.md index 60d51139dd..4943a7d037 100644 --- a/docs/BENCHMARKS.md +++ b/docs/BENCHMARKS.md @@ -2,6 +2,15 @@ This document records reproducible local benchmark snapshots. Completed release-performance history belongs in the [CHANGELOG](../CHANGELOG.md); continuous CI history is available on [Bencher](https://bencher.dev/perf/minigraf/plots). +## Literal keyword/ref expression equality (#774, unreleased) + +On 2026-10-29, caching expression literal resolutions reduced the measured +`=` / `!=` keyword/ref queries by **9.0–11.0%** at 100K and 1M facts, in both +operand orders. Four paired runs per shape swapped sockets between baseline +`5f8073250` and the change. The [report and raw results](benchmarks/774-expression-keywords.md) +include the initial measurements, UUID-keyword controls, point/scan/join guards, +a focused repeat of noisy point timings, and the scope of the improvement. + ## Selective in-memory ancestors (#723, unreleased) **Date**: 2026-10-29 · **Baseline**: `v3` at `756ffea20`. Both revisions @@ -727,7 +736,7 @@ On the executor, before #544 (the executor's query path is gone since #551). `pe - **DICT lookup per row (26–35%).** `uuid_of` does a B+tree `get` for every row's entity id (#530). - **Bindings as `HashMap` (about 25%).** SipHash insert, lookup and drop per row; #473's columnar batches replace them. - **`net_asserted_facts` over committed facts that `live_facts` already resolved (about 10%)** (#532). Superseded by #551's removal of the executor's query path; see the [source audit and fresh envelope/profiles](benchmarks/532-net-assert-audit.md). Pending records still need fact-level net-assert. -- **Keyword constants hashed to a UUID per fact (about 8% of the old join)** (#531). The streaming engine resolves pattern constants while planning; see the [post-#551 audit and profiles](benchmarks/531-keyword-constants.md). Expression keyword/ref equality retains a separate per-row conversion described there. +- **Keyword constants hashed to a UUID per fact (about 8% of the old join)** (#531). The streaming engine resolves pattern constants while planning; see the [post-#551 audit and profiles](benchmarks/531-keyword-constants.md). The separate expression-literal path is measured and optimized in [#774](benchmarks/774-expression-keywords.md); dynamic expression values can still require per-row conversion. - `attribute_value` reads the whole attribute instead of seeking AVET (#518). Fixed by the streaming engine's `Scan` (#544): see below. ### Streaming engine (#544) diff --git a/docs/TEST_COVERAGE.md b/docs/TEST_COVERAGE.md index 37a85d7ec3..f2ec7ae934 100644 --- a/docs/TEST_COVERAGE.md +++ b/docs/TEST_COVERAGE.md @@ -4,9 +4,16 @@ | | Default features | With `--features test-hooks` | |---|---|---| -| **Passing** | 1,988 | 2,021 | +| **Passing** | 1,989 | 2,022 | | **Ignored** | 17 | 18 | -| **Total** | 2,005 | 2,039 | +| **Total** | 2,006 | 2,040 | + +#774 adds one default-feature unit test (also present with `test-hooks`). On +2026-10-29, after rebasing onto #723, its full default suite passed 1,989 tests +with 17 ignored; the targeted `test-hooks` join-equality and plan-independence +suites passed 31 tests. The +full `test-hooks` total above includes the added test; that full suite was not +rerun for #774. Formatting and strict all-feature clippy passed. **#785 patch-coverage verification (2026-10-29)**: the bench machine passed the complete CI branch-coverage run (1,973 passing, 13 ignored; this command excludes doctests) and every unchanged module floor. Overall line coverage is 95.54%. The new boundary cases cover five lines previously reported as missing or partial. CI-equivalent all-features clippy and formatting pass. @@ -36,6 +43,8 @@ Also outside those counts: three native unit tests in the separate #760 `minigra ## Covered Areas +- **Expression keyword literals** (#774): a test-only conversion counter verifies that increasing input from 8 to 2,048 rows does not increase literal resolution work, across `=` / `!=`, both operand orders, nested expressions, bindings, negation, disjunction and rule bodies. Existing join-equality tests also cover changing prepared keyword slots across executions and unchanged keyword output, in memory, after checkpoint and after reopen. The envelope harness checks all eight new expression/control shapes on regular and irregular fixtures. + - **In-memory ancestor join ordering** (#723; four tests): a 1,999-edge tree returns three ancestors within a 128 KiB query budget, also after staged edge replacement; cursor close releases its metered state. Reordered and text-order plans return identical bags across keyword/ref edges, cycles, multi-valued edges, retractions, transaction/valid-time filters, empty and unbound queries, in memory and with checkpointed facts. A direct comparison against the original delta plan protects keyword/ref output representation in rule heads. The bounded cost count excludes writes after a captured snapshot, includes staged records, respects the cap, and excludes prefix-neighbor attributes. - **Proven input order** (#641, first slice; `src/query/engine/order_tests.rs`, `order/tests.rs`, `tests/input_order_test.rs`): full result keys and projection slots, constants and repeated slots, integer/Boolean/float edge cases including NaNs and signed zeros, replacements, join fallback orientation and distinct canonicalization. Snapshot tests cover unrelated versus in-range pending/staged records, captured prefixes, temporal filters, prepared queries, checkpoints and large-transaction working readers including rejected statements and rollback. Counters establish early stopping, bounded raw proof reads and no reads without demand; optional proof-read errors leave the original plan. Late callback and `collect-set` errors retain their evaluation. A forced-fallback differential matrix checks identical ordered lists across plan switches. A committed `MemoryBackend` fixture runs on native, WASI and the browser. Storage tests cover every key kind/tag and raw seeks over retracted history. diff --git a/docs/benchmarks/531-keyword-constants.md b/docs/benchmarks/531-keyword-constants.md index 7291955576..f615815979 100644 --- a/docs/benchmarks/531-keyword-constants.md +++ b/docs/benchmarks/531-keyword-constants.md @@ -177,7 +177,8 @@ binding `HashMap` per row, so the UUID computation is only one potential cost. A follow-up should measure this shape before choosing a milestone or cache design. Preserve equality/inequality semantics, both operand orders, dynamic operands and prepared slots. This is performance-only; under the support policy -it does not warrant a v2.x backport. This draft has not been posted as an issue. +it does not warrant a v2.x backport. This follow-up became #774; see its +[subsequent measurements and literal-cache change](774-expression-keywords.md). ## Deviations from the approved design diff --git a/docs/benchmarks/774-Cargo.lock b/docs/benchmarks/774-Cargo.lock new file mode 100644 index 0000000000..105062fc57 --- /dev/null +++ b/docs/benchmarks/774-Cargo.lock @@ -0,0 +1,1690 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloca" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "assoc" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdc70193dadb9d7287fa4b633f15f90c876915b31f6af17da307fc59c9859a8" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bit-set" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d87354e4229f54a44f7bf2435906a4656dba36026ab6eaca629a2c436a691c" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5727b15fa97d4f4fee0a3b7c3d550ed0269f54329207b86388de918604e31269" +dependencies = [ + "borsh", + "serde", +] + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "borsh" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a" +dependencies = [ + "borsh-derive", + "bytes", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12cdfe656708a01f89b451a7d36466e6fe6c414de0aa18fc54f864f6f9ca9f56" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "clap" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" + +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror", +] + +[[package]] +name = "const-siphasher" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03efed02df0504d71e44bfd51d3329f401b8303a2fd14254acf05c95a0af0153" + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "corosensei" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6886a0c0f263965933c438626e7179139a62b978a33aa18281cbf0cd5a975f34" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "scopeguard", + "windows-sys 0.59.0", +] + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "criterion" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" +dependencies = [ + "alloca", + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "itertools", + "num-traits", + "oorandom", + "page_size", + "plotters", + "rayon", + "regex", + "serde", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "rand_core 0.10.1", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "minicov" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4869b6a491569605d66d3952bcdf03df789e5b536e5f0cf7758a7f08a55ae24d" +dependencies = [ + "cc", + "walkdir", +] + +[[package]] +name = "minigraf" +version = "2.0.5" +dependencies = [ + "anyhow", + "chrono", + "crc32fast", + "criterion", + "js-sys", + "pest", + "pest_derive", + "pest_meta", + "postcard", + "proptest", + "regex-lite", + "serde", + "serde_json", + "shuttle", + "tempfile", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test", + "web-sys", + "wide", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + +[[package]] +name = "owo-colors" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c45bb4a6ae1280ec0803b1ef9d3455eb50f01efbbe1447ab020f1d54fba9d8" + +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "pest" +version = "2.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8db75153506001cb36ed924f08cadc862eb3f8c4d0d534139f29074769d7660" +dependencies = [ + "memchr", + "pest_stack_guard", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20aa17e11fb35664b67d5214a0afac57a360d231b6ec53d6eba0700b27d933b4" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626ec5afccf44ccbfeb2b232316510bb55b4bf34d891afcb0fb07d2b17d7fe9d" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "pest_meta" +version = "2.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3f45b6caa65c1b08186832745159c2529994146340a7bf44168095469720f5d" +dependencies = [ + "pest", +] + +[[package]] +name = "pest_stack_guard" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97e6cd2217057fa86b6eaa512917e58089d875b957a31e35e7ab729977e0a5f2" +dependencies = [ + "psm", + "stacker", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless", + "serde", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8530004ccb15eae51c7e40009fbe317f341f804db54dc033eec1c50be28cfa0" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "chacha20", + "core_detect", + "num-traits", + "rand 0.10.3", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "psm" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +dependencies = [ + "cc", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rand_xorshift" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60aa6af80be32871323012e02e6e65f8a7cc7890931ae421d217ad8fe0df2ccf" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "rusty-fork" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "safe_arch" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42c6efa15875e6ecb39ca61fb0b0c1a40b84fac5a5ffe71eef7d1000c8eb3f5f" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "shuttle" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f796ae4996c3fbf039c26d69536f8e112f49fd5e9a25fd353fe4787134b7cb" +dependencies = [ + "bitvec", + "cfg-if", + "const-siphasher", + "corosensei", + "hex", + "owo-colors", + "rand 0.8.8", + "rand_core 0.6.4", + "rand_pcg", + "scoped-tls", + "shuttle-engine", + "shuttle-schedulers", + "shuttle-std", + "tracing", +] + +[[package]] +name = "shuttle-engine" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf6dad68d0b9d252e56ba6374e05b542b659ee076cf7f319f7c1312d5879d65" +dependencies = [ + "assoc", + "bitvec", + "cfg-if", + "const-siphasher", + "corosensei", + "hex", + "owo-colors", + "rand 0.8.8", + "rand_core 0.6.4", + "rand_pcg", + "scoped-tls", + "smallvec", + "tracing", +] + +[[package]] +name = "shuttle-schedulers" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7673a579e1660404067f5aa1344d6530f15b59f53b0fe98767d7ab117d14067" +dependencies = [ + "rand 0.8.8", + "rand_pcg", + "shuttle-engine", + "smallvec", + "tracing", +] + +[[package]] +name = "shuttle-std" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320b7adce8256548602d4930ef030ac473815a892fd252099702bebcca0d33f8" +dependencies = [ + "assoc", + "owo-colors", + "shuttle-engine", + "smallvec", + "tracing", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stacker" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707f49d46706bacf8a2b00d51dace3f9de527c13eec3778f570c411f89e69967" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.61.2", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.17+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "uuid" +version = "1.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "sha1_smol", + "wasm-bindgen", +] + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-bindgen-test" +version = "0.3.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae7499dfd45780a0a91d7ee6bb9ac51970a4479a41a89da443fdda5a39547d42" +dependencies = [ + "async-trait", + "cast", + "js-sys", + "libm", + "minicov", + "nu-ansi-term", + "num-traits", + "oorandom", + "serde", + "serde_json", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", + "wasm-bindgen-test-shared", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b84b5ac638bfb168196a1a461fcc8f46a294a18b1b6be52133b4e0db122cc9f" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "wasm-bindgen-test-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f692aa943ccd88363733b77063f32cfed5bc6cbea8e6e8b251b302f881606fe" + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wide" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d920ac99c3c8edce110cb8d07dbb324d6d026011dce85b1e9355b70f0adacc4f" +dependencies = [ + "bytemuck", + "safe_arch", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/docs/benchmarks/774-baseline.json b/docs/benchmarks/774-baseline.json new file mode 100644 index 0000000000..4b34b6ab5c --- /dev/null +++ b/docs/benchmarks/774-baseline.json @@ -0,0 +1,364 @@ +{ + "revision": "bee2af00c", + "profile": "envelope", + "numa_node": 1, + "budget_secs": 3, + "scales": [ + { + "scale": "100k", + "build": { + "build_ms": 1316.9764109999999, + "entities": 16666, + "facts": 100000, + "file_bytes": 10764288, + "hot_tx_half": 1253, + "peak_rss_kb": 189604, + "tx_half": 126 + }, + "rounds": [ + [ + { + "max_ms": 39.0162, + "name": "expr_eq_keyword", + "p50_ms": 30.032576, + "p99_ms": 32.360908, + "peak_rss_kb": 7712, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", + "rows": 1, + "runs": 100 + }, + { + "max_ms": 37.885141, + "name": "expr_eq_uuid_keyword", + "p50_ms": 28.235346, + "p99_ms": 29.882284, + "peak_rss_kb": 7868, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 1, + "runs": 106 + }, + { + "max_ms": 37.729647, + "name": "expr_eq_keyword_reverse", + "p50_ms": 30.030960999999998, + "p99_ms": 32.854969, + "peak_rss_kb": 8016, + "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", + "rows": 1, + "runs": 100 + }, + { + "max_ms": 38.150399, + "name": "expr_eq_uuid_keyword_reverse", + "p50_ms": 27.872391999999998, + "p99_ms": 29.826217, + "peak_rss_kb": 7936, + "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 1, + "runs": 108 + }, + { + "max_ms": 39.09252, + "name": "expr_neq_keyword", + "p50_ms": 30.458934, + "p99_ms": 39.09252, + "peak_rss_kb": 6768, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", + "rows": 16665, + "runs": 98 + }, + { + "max_ms": 74.290836, + "name": "expr_neq_uuid_keyword", + "p50_ms": 28.083943, + "p99_ms": 33.073021000000004, + "peak_rss_kb": 6644, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 16665, + "runs": 105 + }, + { + "max_ms": 39.204639, + "name": "expr_neq_keyword_reverse", + "p50_ms": 30.326608, + "p99_ms": 39.204639, + "peak_rss_kb": 6668, + "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", + "rows": 16665, + "runs": 99 + }, + { + "max_ms": 36.402322, + "name": "expr_neq_uuid_keyword_reverse", + "p50_ms": 28.199336, + "p99_ms": 30.541718, + "peak_rss_kb": 6648, + "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 16665, + "runs": 106 + } + ], + [ + { + "max_ms": 35.771424, + "name": "expr_neq_uuid_keyword_reverse", + "p50_ms": 28.046169, + "p99_ms": 30.256328, + "peak_rss_kb": 6736, + "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 16665, + "runs": 107 + }, + { + "max_ms": 37.793744999999994, + "name": "expr_neq_keyword_reverse", + "p50_ms": 30.159523, + "p99_ms": 32.663612, + "peak_rss_kb": 6780, + "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", + "rows": 16665, + "runs": 100 + }, + { + "max_ms": 35.293779, + "name": "expr_neq_uuid_keyword", + "p50_ms": 27.951783000000002, + "p99_ms": 29.855111, + "peak_rss_kb": 6660, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 16665, + "runs": 107 + }, + { + "max_ms": 37.884063000000005, + "name": "expr_neq_keyword", + "p50_ms": 30.266602, + "p99_ms": 37.884063000000005, + "peak_rss_kb": 6776, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", + "rows": 16665, + "runs": 99 + }, + { + "max_ms": 34.789031, + "name": "expr_eq_uuid_keyword_reverse", + "p50_ms": 27.695786, + "p99_ms": 29.897164, + "peak_rss_kb": 7936, + "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 1, + "runs": 108 + }, + { + "max_ms": 38.426483, + "name": "expr_eq_keyword_reverse", + "p50_ms": 31.327916999999996, + "p99_ms": 38.426483, + "peak_rss_kb": 7716, + "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", + "rows": 1, + "runs": 96 + }, + { + "max_ms": 77.075159, + "name": "expr_eq_uuid_keyword", + "p50_ms": 27.740305, + "p99_ms": 29.358578, + "peak_rss_kb": 8024, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 1, + "runs": 107 + }, + { + "max_ms": 37.354892, + "name": "expr_eq_keyword", + "p50_ms": 30.063471, + "p99_ms": 32.716125999999996, + "peak_rss_kb": 8148, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", + "rows": 1, + "runs": 100 + } + ] + ] + }, + { + "scale": "1m", + "build": { + "build_ms": 11836.1777, + "entities": 166666, + "facts": 1000000, + "file_bytes": 126275584, + "hot_tx_half": 3503, + "peak_rss_kb": 400172, + "tx_half": 1251 + }, + "rounds": [ + [ + { + "max_ms": 328.649495, + "name": "expr_eq_keyword", + "p50_ms": 321.393816, + "p99_ms": 328.649495, + "peak_rss_kb": 27152, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", + "rows": 1, + "runs": 10 + }, + { + "max_ms": 313.50907, + "name": "expr_eq_uuid_keyword", + "p50_ms": 300.285198, + "p99_ms": 313.50907, + "peak_rss_kb": 27096, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 1, + "runs": 10 + }, + { + "max_ms": 368.585977, + "name": "expr_eq_keyword_reverse", + "p50_ms": 320.223641, + "p99_ms": 368.585977, + "peak_rss_kb": 27384, + "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", + "rows": 1, + "runs": 10 + }, + { + "max_ms": 305.34902800000003, + "name": "expr_eq_uuid_keyword_reverse", + "p50_ms": 299.176499, + "p99_ms": 305.34902800000003, + "peak_rss_kb": 27256, + "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 1, + "runs": 10 + }, + { + "max_ms": 331.118143, + "name": "expr_neq_keyword", + "p50_ms": 321.090675, + "p99_ms": 331.118143, + "peak_rss_kb": 7540, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 306.910307, + "name": "expr_neq_uuid_keyword", + "p50_ms": 300.345146, + "p99_ms": 306.910307, + "peak_rss_kb": 7304, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 328.663216, + "name": "expr_neq_keyword_reverse", + "p50_ms": 322.676362, + "p99_ms": 328.663216, + "peak_rss_kb": 7324, + "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 313.635578, + "name": "expr_neq_uuid_keyword_reverse", + "p50_ms": 301.456595, + "p99_ms": 313.635578, + "peak_rss_kb": 7476, + "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 166665, + "runs": 10 + } + ], + [ + { + "max_ms": 345.124222, + "name": "expr_neq_uuid_keyword_reverse", + "p50_ms": 302.066161, + "p99_ms": 345.124222, + "peak_rss_kb": 7340, + "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 327.828536, + "name": "expr_neq_keyword_reverse", + "p50_ms": 321.46997300000004, + "p99_ms": 327.828536, + "peak_rss_kb": 7196, + "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 308.011673, + "name": "expr_neq_uuid_keyword", + "p50_ms": 299.48798999999997, + "p99_ms": 308.011673, + "peak_rss_kb": 7400, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 330.09263599999997, + "name": "expr_neq_keyword", + "p50_ms": 322.66222, + "p99_ms": 330.09263599999997, + "peak_rss_kb": 7496, + "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", + "rows": 166665, + "runs": 10 + }, + { + "max_ms": 304.01844300000005, + "name": "expr_eq_uuid_keyword_reverse", + "p50_ms": 295.28919399999995, + "p99_ms": 304.01844300000005, + "peak_rss_kb": 27208, + "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", + "rows": 1, + "runs": 11 + }, + { + "max_ms": 332.082049, + "name": "expr_eq_keyword_reverse", + "p50_ms": 318.546972, + "p99_ms": 332.082049, + "peak_rss_kb": 27196, + "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", + "rows": 1, + "runs": 10 + }, + { + "max_ms": 304.171792, + "name": "expr_eq_uuid_keyword", + "p50_ms": 297.68289799999997, + "p99_ms": 304.171792, + "peak_rss_kb": 27116, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", + "rows": 1, + "runs": 11 + }, + { + "max_ms": 328.20967299999995, + "name": "expr_eq_keyword", + "p50_ms": 319.91393899999997, + "p99_ms": 328.20967299999995, + "peak_rss_kb": 26740, + "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", + "rows": 1, + "runs": 10 + } + ] + ] + } + ] +} diff --git a/docs/benchmarks/774-build.json b/docs/benchmarks/774-build.json new file mode 100644 index 0000000000..20d3c58fba --- /dev/null +++ b/docs/benchmarks/774-build.json @@ -0,0 +1,37 @@ +{ + "date": "2026-10-29", + "baseline_revision": "5f80732509a37e0674e40657468149c1af83acb1", + "rustc": "1.99.1 (58cf8f9c3 2026-10-13)", + "kernel": "Linux 6.8.0-139-generic", + "governor": "schedutil", + "profile": "envelope", + "rustflags": "-Cforce-frame-pointers=yes", + "initial_baseline_node": 1, + "comparison_nodes": [ + 1, + 3 + ], + "rounds": 4, + "point_check_rounds": 20, + "build_and_tests_during_timing": false, + "source_sha256": { + "src/query/datalog/executor.rs": "9cd1cb15d0951230f80f47deda2282ca890ce71dfdb38ff84420230bd9691921", + "src/query/datalog/matcher.rs": "49aa4a8888f6c1a51759b53cb45c538c6e6e8916b80c469141b75540057e6003", + "src/query/engine/filter.rs": "cb062cff451364682b9297fe2d5c4fa88d2c476ce9db5d02c4198199429ba4e3", + "tests/join_rules_test.rs": "4931cf9a912b16fcd2b4f0684d3c67c3b27372dd2bd33970fb7205ba5910dc4b", + "examples/perf_envelope.rs": "682771af71bd4f49703ac4580dabac97155dcae626eddc370e6f23469a01d609" + }, + "lockfile_sha256": "08a1495662974810709834e9a3530faa0f1f63656020f868767a75bc20fd625f", + "validation": { + "default_passed": 1989, + "default_ignored": 17, + "targeted_test_hooks_passed": 31, + "clippy": "cargo clippy --all-features -- -D warnings", + "format": "cargo fmt --check", + "docs_versions": 13, + "docs_pages": 368 + }, + "initial_baseline_revision": "bee2af00ce2008261a68993f625082fc4c8ffdb9", + "release_binary_bytes": 1263016, + "release_binary_limit_bytes": 1263616 +} diff --git a/docs/benchmarks/774-compare.py b/docs/benchmarks/774-compare.py new file mode 100644 index 0000000000..ebd47e6585 --- /dev/null +++ b/docs/benchmarks/774-compare.py @@ -0,0 +1,51 @@ +"""Compare two perf_envelope binaries on existing #394 fixtures. + +Usage: python3 774-compare.py BEFORE AFTER FIXTURES OUTPUT.jsonl [point] +Build both binaries with the eight #774 shapes (indexes 24..31). Run on an +otherwise idle host with NUMA nodes 1 and 3 on separate sockets. Each pair +runs concurrently; the next round swaps sockets. No build/test may overlap. +""" + +import concurrent.futures +import json +import pathlib +import subprocess +import sys + +before, after, fixtures, output = map(pathlib.Path, sys.argv[1:5]) +assert sys.argv[5:] in ([], ["point"]) +point_check = sys.argv[5:] == ["point"] + + +def measure(binary, fixture, index, node): + command = [ + "numactl", f"--cpunodebind={node}", f"--membind={node}", + str(binary), "__query", str(fixture), str(index), "3", "60", + ] + result = json.loads(subprocess.check_output(command, text=True)) + assert "error" not in result and "capped_ms" not in result, result + assert result["runs"] >= 5, result + return result + + +with output.open("x") as stream, concurrent.futures.ThreadPoolExecutor(2) as pool: + for scale in ["100k", "1m"]: + fixture = fixtures / f"fixture-v1-{scale}.graph" + for round_index in range(20 if point_check else 4): + nodes = (1, 3) if round_index % 2 == 0 else (3, 1) + indexes = [0] if point_check else [*range(24, 32), 0, 2, 4, 6] + if round_index % 2: + indexes.reverse() + for index in indexes: + a = pool.submit(measure, before, fixture, index, nodes[0]) + b = pool.submit(measure, after, fixture, index, nodes[1]) + a, b = a.result(), b.result() + assert a["name"] == b["name"] and a["rows"] == b["rows"], (a, b) + record = { + "scale": scale, "round": round_index, + "before_node": nodes[0], "after_node": nodes[1], + "before": a, "after": b, + } + stream.write(json.dumps(record) + "\n") + stream.flush() + print(scale, round_index, a["name"], a["p50_ms"], b["p50_ms"], flush=True) diff --git a/docs/benchmarks/774-comparison.jsonl b/docs/benchmarks/774-comparison.jsonl new file mode 100644 index 0000000000..d9f357e793 --- /dev/null +++ b/docs/benchmarks/774-comparison.jsonl @@ -0,0 +1,96 @@ +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 38.172686999999996, "name": "expr_eq_keyword", "p50_ms": 30.121843, "p99_ms": 32.02059, "peak_rss_kb": 8480, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 100}, "after": {"max_ms": 35.54367499999999, "name": "expr_eq_keyword", "p50_ms": 27.036889000000002, "p99_ms": 28.388727, "peak_rss_kb": 7720, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 111}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 66.641276, "name": "expr_eq_uuid_keyword", "p50_ms": 27.85578, "p99_ms": 32.774638, "peak_rss_kb": 7712, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 106}, "after": {"max_ms": 66.780273, "name": "expr_eq_uuid_keyword", "p50_ms": 26.999263, "p99_ms": 30.228959, "peak_rss_kb": 8148, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 110}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.807043, "name": "expr_eq_keyword_reverse", "p50_ms": 30.05538, "p99_ms": 31.995737000000002, "peak_rss_kb": 7316, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 100}, "after": {"max_ms": 36.356488999999996, "name": "expr_eq_keyword_reverse", "p50_ms": 26.840578, "p99_ms": 28.210584, "peak_rss_kb": 8188, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.140193000000004, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 27.859273, "p99_ms": 29.630339, "peak_rss_kb": 7712, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 35.606758, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 26.74957, "p99_ms": 28.17467, "peak_rss_kb": 7980, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.531945, "name": "expr_neq_keyword", "p50_ms": 30.291538, "p99_ms": 37.531945, "peak_rss_kb": 6660, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 35.193961, "name": "expr_neq_keyword", "p50_ms": 27.165564, "p99_ms": 28.538159, "peak_rss_kb": 6732, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.356718, "name": "expr_neq_uuid_keyword", "p50_ms": 28.118677, "p99_ms": 30.32815, "peak_rss_kb": 6760, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 36.182224999999995, "name": "expr_neq_uuid_keyword", "p50_ms": 27.14916, "p99_ms": 28.58625, "peak_rss_kb": 6752, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.969173000000005, "name": "expr_neq_keyword_reverse", "p50_ms": 30.308667, "p99_ms": 37.969173000000005, "peak_rss_kb": 6764, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 35.825079, "name": "expr_neq_keyword_reverse", "p50_ms": 27.029688, "p99_ms": 28.43673, "peak_rss_kb": 6712, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.631414, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 28.122788, "p99_ms": 29.732833, "peak_rss_kb": 6732, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 36.658607, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 27.009413, "p99_ms": 28.281385, "peak_rss_kb": 6804, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.047007, "name": "point_entity", "p50_ms": 0.017915999999999998, "p99_ms": 0.036565, "peak_rss_kb": 5280, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.062543, "name": "point_entity", "p50_ms": 0.017995999999999998, "p99_ms": 0.029944, "peak_rss_kb": 5264, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 18.335873, "name": "attribute_scan", "p50_ms": 11.223801, "p99_ms": 12.499577, "peak_rss_kb": 6640, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}, "after": {"max_ms": 18.865526, "name": "attribute_scan", "p50_ms": 11.230580999999999, "p99_ms": 12.604847000000001, "peak_rss_kb": 6580, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.383745, "name": "join_3_selective", "p50_ms": 0.209333, "p99_ms": 0.273345, "peak_rss_kb": 5332, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.27582399999999996, "name": "join_3_selective", "p50_ms": 0.21242, "p99_ms": 0.257907, "peak_rss_kb": 5344, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.087854, "name": "join_2_pseudo", "p50_ms": 0.045703, "p99_ms": 0.086529, "peak_rss_kb": 5296, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.060856999999999994, "name": "join_2_pseudo", "p50_ms": 0.045348, "p99_ms": 0.052625, "peak_rss_kb": 5300, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.074679, "name": "join_2_pseudo", "p50_ms": 0.046635, "p99_ms": 0.07205700000000001, "peak_rss_kb": 5320, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.08881700000000001, "name": "join_2_pseudo", "p50_ms": 0.045720000000000004, "p99_ms": 0.08036599999999999, "peak_rss_kb": 5264, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.24623, "name": "join_3_selective", "p50_ms": 0.210698, "p99_ms": 0.240463, "peak_rss_kb": 5336, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.25902800000000004, "name": "join_3_selective", "p50_ms": 0.208309, "p99_ms": 0.252743, "peak_rss_kb": 5300, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 18.940093, "name": "attribute_scan", "p50_ms": 11.305117, "p99_ms": 12.260304, "peak_rss_kb": 6672, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}, "after": {"max_ms": 18.404075, "name": "attribute_scan", "p50_ms": 11.287626, "p99_ms": 13.570237, "peak_rss_kb": 6680, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.028462, "name": "point_entity", "p50_ms": 0.017743, "p99_ms": 0.024779000000000002, "peak_rss_kb": 5296, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.035863, "name": "point_entity", "p50_ms": 0.018308, "p99_ms": 0.034009, "peak_rss_kb": 5200, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 37.322703, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 28.061382, "p99_ms": 29.535404, "peak_rss_kb": 6736, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 34.699220000000004, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 27.093283, "p99_ms": 28.902335, "peak_rss_kb": 6792, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 39.268028, "name": "expr_neq_keyword_reverse", "p50_ms": 30.303344, "p99_ms": 39.268028, "peak_rss_kb": 6656, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 34.606755, "name": "expr_neq_keyword_reverse", "p50_ms": 27.12486, "p99_ms": 29.252756, "peak_rss_kb": 6748, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 36.328804999999996, "name": "expr_neq_uuid_keyword", "p50_ms": 28.067473, "p99_ms": 29.910616, "peak_rss_kb": 6744, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 31.153255, "name": "expr_neq_uuid_keyword", "p50_ms": 27.206312, "p99_ms": 30.732408, "peak_rss_kb": 6696, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 39.614965000000005, "name": "expr_neq_keyword", "p50_ms": 30.321352, "p99_ms": 39.614965000000005, "peak_rss_kb": 6684, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 34.592215, "name": "expr_neq_keyword", "p50_ms": 27.274179, "p99_ms": 28.928548, "peak_rss_kb": 6700, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 37.018121, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 27.847153, "p99_ms": 32.086909, "peak_rss_kb": 7884, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 34.729108000000004, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 27.050620000000002, "p99_ms": 30.478641, "peak_rss_kb": 8136, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 111}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 39.299893000000004, "name": "expr_eq_keyword_reverse", "p50_ms": 29.983796, "p99_ms": 31.302771, "peak_rss_kb": 7904, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 100}, "after": {"max_ms": 33.943031999999995, "name": "expr_eq_keyword_reverse", "p50_ms": 26.656178999999998, "p99_ms": 28.325434, "peak_rss_kb": 7724, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 113}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 35.435770999999995, "name": "expr_eq_uuid_keyword", "p50_ms": 27.751137, "p99_ms": 29.624823000000003, "peak_rss_kb": 7712, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 34.155637000000006, "name": "expr_eq_uuid_keyword", "p50_ms": 26.969531, "p99_ms": 28.699715, "peak_rss_kb": 7740, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 111}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 85.319125, "name": "expr_eq_keyword", "p50_ms": 30.092045000000002, "p99_ms": 85.319125, "peak_rss_kb": 7820, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 98}, "after": {"max_ms": 80.347008, "name": "expr_eq_keyword", "p50_ms": 26.867833, "p99_ms": 32.555188, "peak_rss_kb": 8048, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 110}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.400848, "name": "expr_eq_keyword", "p50_ms": 29.947982000000003, "p99_ms": 31.240279, "peak_rss_kb": 7716, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 100}, "after": {"max_ms": 35.504642000000004, "name": "expr_eq_keyword", "p50_ms": 26.780011, "p99_ms": 28.716773, "peak_rss_kb": 7948, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.331216, "name": "expr_eq_uuid_keyword", "p50_ms": 28.056072, "p99_ms": 29.692626999999998, "peak_rss_kb": 8200, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 107}, "after": {"max_ms": 35.083836, "name": "expr_eq_uuid_keyword", "p50_ms": 26.838635, "p99_ms": 28.582476999999997, "peak_rss_kb": 8392, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.580346, "name": "expr_eq_keyword_reverse", "p50_ms": 30.251383999999998, "p99_ms": 37.580346, "peak_rss_kb": 7720, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 99}, "after": {"max_ms": 34.998388, "name": "expr_eq_keyword_reverse", "p50_ms": 26.702487, "p99_ms": 28.078896, "peak_rss_kb": 7720, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.503723, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 27.763967, "p99_ms": 29.351390000000002, "peak_rss_kb": 8136, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 35.420016, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 26.711116999999998, "p99_ms": 28.131717000000002, "peak_rss_kb": 7992, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 37.574869, "name": "expr_neq_keyword", "p50_ms": 30.210717000000002, "p99_ms": 37.574869, "peak_rss_kb": 6672, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 35.032828, "name": "expr_neq_keyword", "p50_ms": 26.952827, "p99_ms": 28.424934, "peak_rss_kb": 6696, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 35.753702999999994, "name": "expr_neq_uuid_keyword", "p50_ms": 28.061875999999998, "p99_ms": 29.892759, "peak_rss_kb": 6660, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 36.314161999999996, "name": "expr_neq_uuid_keyword", "p50_ms": 27.091864, "p99_ms": 28.691192, "peak_rss_kb": 6740, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 38.491423, "name": "expr_neq_keyword_reverse", "p50_ms": 30.21256, "p99_ms": 38.491423, "peak_rss_kb": 6672, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 35.824097, "name": "expr_neq_keyword_reverse", "p50_ms": 26.984061, "p99_ms": 28.447175, "peak_rss_kb": 6748, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 34.094349, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 28.298009999999998, "p99_ms": 33.032439, "peak_rss_kb": 6740, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 106}, "after": {"max_ms": 35.421498, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 27.267259, "p99_ms": 29.915224000000002, "peak_rss_kb": 6780, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.059205, "name": "point_entity", "p50_ms": 0.018546, "p99_ms": 0.047920000000000004, "peak_rss_kb": 5188, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.043671, "name": "point_entity", "p50_ms": 0.019049999999999997, "p99_ms": 0.038553000000000004, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 13.463137999999999, "name": "attribute_scan", "p50_ms": 11.626662, "p99_ms": 12.030948, "peak_rss_kb": 6560, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}, "after": {"max_ms": 12.686559, "name": "attribute_scan", "p50_ms": 11.155880999999999, "p99_ms": 11.472301, "peak_rss_kb": 6584, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.30991599999999997, "name": "join_3_selective", "p50_ms": 0.210282, "p99_ms": 0.26370400000000005, "peak_rss_kb": 5344, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.24761100000000003, "name": "join_3_selective", "p50_ms": 0.21501800000000001, "p99_ms": 0.23436, "peak_rss_kb": 5308, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.081698, "name": "join_2_pseudo", "p50_ms": 0.045330999999999996, "p99_ms": 0.075076, "peak_rss_kb": 5320, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.081926, "name": "join_2_pseudo", "p50_ms": 0.046885, "p99_ms": 0.075056, "peak_rss_kb": 5296, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.06915900000000001, "name": "join_2_pseudo", "p50_ms": 0.046463, "p99_ms": 0.060692, "peak_rss_kb": 5284, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.089357, "name": "join_2_pseudo", "p50_ms": 0.045785000000000006, "p99_ms": 0.086703, "peak_rss_kb": 5316, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p8333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.228378, "name": "join_3_selective", "p50_ms": 0.209257, "p99_ms": 0.223581, "peak_rss_kb": 5316, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.28936100000000003, "name": "join_3_selective", "p50_ms": 0.20613700000000001, "p99_ms": 0.250969, "peak_rss_kb": 5312, "query": "[:find ?n :where [:p8333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 12.632398, "name": "attribute_scan", "p50_ms": 11.25478, "p99_ms": 11.553135000000001, "peak_rss_kb": 6576, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}, "after": {"max_ms": 12.727141000000001, "name": "attribute_scan", "p50_ms": 11.17432, "p99_ms": 11.894558, "peak_rss_kb": 6532, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 16666, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.041031, "name": "point_entity", "p50_ms": 0.017882, "p99_ms": 0.034512, "peak_rss_kb": 5292, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.048293, "name": "point_entity", "p50_ms": 0.018312000000000002, "p99_ms": 0.036881000000000004, "peak_rss_kb": 5296, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 36.96555, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 28.015053, "p99_ms": 29.393988, "peak_rss_kb": 6756, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 34.250491000000004, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 27.125683000000002, "p99_ms": 29.037596, "peak_rss_kb": 6772, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 16665, "runs": 110}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 39.936296000000006, "name": "expr_neq_keyword_reverse", "p50_ms": 30.569932, "p99_ms": 39.936296000000006, "peak_rss_kb": 6676, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 98}, "after": {"max_ms": 34.80977, "name": "expr_neq_keyword_reverse", "p50_ms": 27.045485, "p99_ms": 30.110362000000002, "peak_rss_kb": 6648, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 36.619941000000004, "name": "expr_neq_uuid_keyword", "p50_ms": 28.022864000000002, "p99_ms": 29.538936, "peak_rss_kb": 6652, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 107}, "after": {"max_ms": 34.632517, "name": "expr_neq_uuid_keyword", "p50_ms": 27.126244, "p99_ms": 28.715509, "peak_rss_kb": 6740, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 16665, "runs": 111}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 37.931675, "name": "expr_neq_keyword", "p50_ms": 30.199807, "p99_ms": 37.931675, "peak_rss_kb": 6768, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 99}, "after": {"max_ms": 34.867053, "name": "expr_neq_keyword", "p50_ms": 27.661939, "p99_ms": 29.259756000000003, "peak_rss_kb": 6696, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 16665, "runs": 108}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 72.935715, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 27.798388, "p99_ms": 29.656251, "peak_rss_kb": 7728, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 73.99854, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 29.038932, "p99_ms": 30.634464, "peak_rss_kb": 7712, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 104}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 37.574352, "name": "expr_eq_keyword_reverse", "p50_ms": 29.99662, "p99_ms": 32.18869, "peak_rss_kb": 8152, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 100}, "after": {"max_ms": 34.154296, "name": "expr_eq_keyword_reverse", "p50_ms": 26.797672000000002, "p99_ms": 28.572647, "peak_rss_kb": 7936, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 112}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 35.728528000000004, "name": "expr_eq_uuid_keyword", "p50_ms": 27.73568, "p99_ms": 31.722451, "peak_rss_kb": 7944, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 108}, "after": {"max_ms": 34.215444, "name": "expr_eq_uuid_keyword", "p50_ms": 26.974664999999998, "p99_ms": 33.196807, "peak_rss_kb": 7712, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 111}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 39.124526, "name": "expr_eq_keyword", "p50_ms": 29.759055999999998, "p99_ms": 31.188556, "peak_rss_kb": 7708, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 101}, "after": {"max_ms": 33.00637, "name": "expr_eq_keyword", "p50_ms": 26.831041, "p99_ms": 29.925387, "peak_rss_kb": 7720, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 112}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 326.485865, "name": "expr_eq_keyword", "p50_ms": 319.928065, "p99_ms": 326.485865, "peak_rss_kb": 27176, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 297.236521, "name": "expr_eq_keyword", "p50_ms": 287.984887, "p99_ms": 297.236521, "peak_rss_kb": 27180, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 325.92919, "name": "expr_eq_uuid_keyword", "p50_ms": 318.277263, "p99_ms": 325.92919, "peak_rss_kb": 26956, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 295.58598600000005, "name": "expr_eq_uuid_keyword", "p50_ms": 285.56204299999996, "p99_ms": 295.58598600000005, "peak_rss_kb": 27192, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 327.990095, "name": "expr_eq_keyword_reverse", "p50_ms": 318.426101, "p99_ms": 327.990095, "peak_rss_kb": 27220, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 295.979764, "name": "expr_eq_keyword_reverse", "p50_ms": 287.276882, "p99_ms": 295.979764, "peak_rss_kb": 27160, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 304.190687, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 297.530197, "p99_ms": 304.190687, "peak_rss_kb": 27748, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}, "after": {"max_ms": 297.932967, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 288.227866, "p99_ms": 297.932967, "peak_rss_kb": 27136, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 329.201387, "name": "expr_neq_keyword", "p50_ms": 321.384758, "p99_ms": 329.201387, "peak_rss_kb": 7244, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 298.875192, "name": "expr_neq_keyword", "p50_ms": 289.540753, "p99_ms": 298.875192, "peak_rss_kb": 7372, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 305.98110099999997, "name": "expr_neq_uuid_keyword", "p50_ms": 299.82825099999997, "p99_ms": 305.98110099999997, "peak_rss_kb": 7360, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 300.970815, "name": "expr_neq_uuid_keyword", "p50_ms": 292.949126, "p99_ms": 300.970815, "peak_rss_kb": 7252, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 334.63544299999995, "name": "expr_neq_keyword_reverse", "p50_ms": 322.05778200000003, "p99_ms": 334.63544299999995, "peak_rss_kb": 7292, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 302.713361, "name": "expr_neq_keyword_reverse", "p50_ms": 291.178263, "p99_ms": 302.713361, "peak_rss_kb": 7224, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 310.08608, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 302.47193300000004, "p99_ms": 310.08608, "peak_rss_kb": 7164, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 296.910599, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 288.321988, "p99_ms": 296.910599, "peak_rss_kb": 7336, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.036436, "name": "point_entity", "p50_ms": 0.018202999999999997, "p99_ms": 0.033209, "peak_rss_kb": 5332, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.027736999999999998, "name": "point_entity", "p50_ms": 0.018416000000000002, "p99_ms": 0.02456, "peak_rss_kb": 5232, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 125.983623, "name": "attribute_scan", "p50_ms": 118.87287500000001, "p99_ms": 125.983623, "peak_rss_kb": 7500, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 26}, "after": {"max_ms": 131.824938, "name": "attribute_scan", "p50_ms": 122.53755, "p99_ms": 131.824938, "peak_rss_kb": 7364, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.251562, "name": "join_3_selective", "p50_ms": 0.20315399999999997, "p99_ms": 0.24840399999999999, "peak_rss_kb": 5368, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.21515900000000002, "name": "join_3_selective", "p50_ms": 0.203527, "p99_ms": 0.213457, "peak_rss_kb": 5328, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.07506399999999999, "name": "join_2_pseudo", "p50_ms": 0.044711, "p99_ms": 0.071128, "peak_rss_kb": 5376, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.065525, "name": "join_2_pseudo", "p50_ms": 0.046973, "p99_ms": 0.055496, "peak_rss_kb": 5272, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.057441, "name": "join_2_pseudo", "p50_ms": 0.046557999999999995, "p99_ms": 0.055247000000000004, "peak_rss_kb": 5128, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.070273, "name": "join_2_pseudo", "p50_ms": 0.045238, "p99_ms": 0.063106, "peak_rss_kb": 5252, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.214732, "name": "join_3_selective", "p50_ms": 0.206901, "p99_ms": 0.214178, "peak_rss_kb": 5388, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.260645, "name": "join_3_selective", "p50_ms": 0.202851, "p99_ms": 0.24631099999999997, "peak_rss_kb": 5376, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 131.776751, "name": "attribute_scan", "p50_ms": 121.466576, "p99_ms": 131.776751, "peak_rss_kb": 7320, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}, "after": {"max_ms": 130.57815300000001, "name": "attribute_scan", "p50_ms": 122.57969800000001, "p99_ms": 130.57815300000001, "peak_rss_kb": 7288, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.035756, "name": "point_entity", "p50_ms": 0.018273, "p99_ms": 0.023891, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.048597, "name": "point_entity", "p50_ms": 0.018128, "p99_ms": 0.035627000000000006, "peak_rss_kb": 5128, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 312.644461, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 301.834857, "p99_ms": 312.644461, "peak_rss_kb": 7280, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 304.691265, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 290.07744, "p99_ms": 304.691265, "peak_rss_kb": 7292, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 329.261938, "name": "expr_neq_keyword_reverse", "p50_ms": 320.278653, "p99_ms": 329.261938, "peak_rss_kb": 7344, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 296.73213799999996, "name": "expr_neq_keyword_reverse", "p50_ms": 289.87710300000003, "p99_ms": 296.73213799999996, "peak_rss_kb": 7376, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 309.39553600000005, "name": "expr_neq_uuid_keyword", "p50_ms": 301.235093, "p99_ms": 309.39553600000005, "peak_rss_kb": 7452, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 299.271117, "name": "expr_neq_uuid_keyword", "p50_ms": 290.997541, "p99_ms": 299.271117, "peak_rss_kb": 7152, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 330.050317, "name": "expr_neq_keyword", "p50_ms": 320.850531, "p99_ms": 330.050317, "peak_rss_kb": 7356, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 301.787748, "name": "expr_neq_keyword", "p50_ms": 294.479708, "p99_ms": 301.787748, "peak_rss_kb": 7272, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 308.942221, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 299.06558900000005, "p99_ms": 308.942221, "peak_rss_kb": 27152, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 296.73163200000005, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 289.614439, "p99_ms": 296.73163200000005, "peak_rss_kb": 27196, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 327.535658, "name": "expr_eq_keyword_reverse", "p50_ms": 317.413135, "p99_ms": 327.535658, "peak_rss_kb": 27104, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 295.567601, "name": "expr_eq_keyword_reverse", "p50_ms": 285.05544399999997, "p99_ms": 295.567601, "peak_rss_kb": 27260, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 305.81662900000003, "name": "expr_eq_uuid_keyword", "p50_ms": 297.87188399999997, "p99_ms": 305.81662900000003, "peak_rss_kb": 27128, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}, "after": {"max_ms": 301.03254499999997, "name": "expr_eq_uuid_keyword", "p50_ms": 287.786496, "p99_ms": 301.03254499999997, "peak_rss_kb": 27160, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 328.310615, "name": "expr_eq_keyword", "p50_ms": 320.225657, "p99_ms": 328.310615, "peak_rss_kb": 27208, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 294.243251, "name": "expr_eq_keyword", "p50_ms": 288.80468399999995, "p99_ms": 294.243251, "peak_rss_kb": 27136, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 326.727012, "name": "expr_eq_keyword", "p50_ms": 318.88235399999996, "p99_ms": 326.727012, "peak_rss_kb": 27164, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 297.496661, "name": "expr_eq_keyword", "p50_ms": 287.150397, "p99_ms": 297.496661, "peak_rss_kb": 27152, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 305.888777, "name": "expr_eq_uuid_keyword", "p50_ms": 297.710237, "p99_ms": 305.888777, "peak_rss_kb": 27196, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}, "after": {"max_ms": 299.914175, "name": "expr_eq_uuid_keyword", "p50_ms": 289.014783, "p99_ms": 299.914175, "peak_rss_kb": 27188, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 332.60569200000003, "name": "expr_eq_keyword_reverse", "p50_ms": 325.030483, "p99_ms": 332.60569200000003, "peak_rss_kb": 27212, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 295.924124, "name": "expr_eq_keyword_reverse", "p50_ms": 286.427117, "p99_ms": 295.924124, "peak_rss_kb": 27172, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 309.86528000000004, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 300.457632, "p99_ms": 309.86528000000004, "peak_rss_kb": 26888, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 297.103248, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 288.146435, "p99_ms": 297.103248, "peak_rss_kb": 27160, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 330.442402, "name": "expr_neq_keyword", "p50_ms": 322.25151, "p99_ms": 330.442402, "peak_rss_kb": 7420, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 298.8356, "name": "expr_neq_keyword", "p50_ms": 289.465329, "p99_ms": 298.8356, "peak_rss_kb": 7452, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 306.362486, "name": "expr_neq_uuid_keyword", "p50_ms": 298.773731, "p99_ms": 306.362486, "peak_rss_kb": 7476, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 11}, "after": {"max_ms": 298.90673499999997, "name": "expr_neq_uuid_keyword", "p50_ms": 290.438401, "p99_ms": 298.90673499999997, "peak_rss_kb": 7320, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 327.47481899999997, "name": "expr_neq_keyword_reverse", "p50_ms": 320.272039, "p99_ms": 327.47481899999997, "peak_rss_kb": 7476, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 301.049497, "name": "expr_neq_keyword_reverse", "p50_ms": 290.595605, "p99_ms": 301.049497, "peak_rss_kb": 7240, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 307.06935000000004, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 299.231054, "p99_ms": 307.06935000000004, "peak_rss_kb": 7504, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 299.982313, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 290.367123, "p99_ms": 299.982313, "peak_rss_kb": 7460, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.052988, "name": "point_entity", "p50_ms": 0.018539999999999997, "p99_ms": 0.035656, "peak_rss_kb": 5116, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.037169, "name": "point_entity", "p50_ms": 0.017901999999999998, "p99_ms": 0.028271, "peak_rss_kb": 5120, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 137.39736, "name": "attribute_scan", "p50_ms": 124.885532, "p99_ms": 137.39736, "peak_rss_kb": 7316, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 24}, "after": {"max_ms": 133.782864, "name": "attribute_scan", "p50_ms": 123.679502, "p99_ms": 133.782864, "peak_rss_kb": 7340, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.23874399999999998, "name": "join_3_selective", "p50_ms": 0.206751, "p99_ms": 0.23508900000000002, "peak_rss_kb": 5416, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.214343, "name": "join_3_selective", "p50_ms": 0.20117200000000002, "p99_ms": 0.21079799999999999, "peak_rss_kb": 5408, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.06849000000000001, "name": "join_2_pseudo", "p50_ms": 0.044717, "p99_ms": 0.06626699999999999, "peak_rss_kb": 5180, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.055941, "name": "join_2_pseudo", "p50_ms": 0.044923, "p99_ms": 0.053111, "peak_rss_kb": 5336, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.054207, "name": "join_2_pseudo", "p50_ms": 0.044533, "p99_ms": 0.052348, "peak_rss_kb": 5128, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.069395, "name": "join_2_pseudo", "p50_ms": 0.045206, "p99_ms": 0.068773, "peak_rss_kb": 5304, "query": "[:find ?n ?t :valid-at :any-valid-time :where [:p83333 :follows ?f] [?f :name ?n] [?f :db/tx-count ?t]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.221339, "name": "join_3_selective", "p50_ms": 0.20532, "p99_ms": 0.217324, "peak_rss_kb": 5352, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}, "after": {"max_ms": 0.26178399999999996, "name": "join_3_selective", "p50_ms": 0.206629, "p99_ms": 0.25190500000000005, "peak_rss_kb": 5404, "query": "[:find ?n :where [:p83333 :manager ?b] [?s :manager ?b] [?s :name ?n]]", "rows": 10, "runs": 200}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 132.790649, "name": "attribute_scan", "p50_ms": 120.841326, "p99_ms": 132.790649, "peak_rss_kb": 7332, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}, "after": {"max_ms": 130.836857, "name": "attribute_scan", "p50_ms": 119.88955, "p99_ms": 130.836857, "peak_rss_kb": 7320, "query": "[:find ?e ?a :where [?e :age ?a]]", "rows": 166666, "runs": 25}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.059322, "name": "point_entity", "p50_ms": 0.017646, "p99_ms": 0.056393, "peak_rss_kb": 5228, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.046916, "name": "point_entity", "p50_ms": 0.018079, "p99_ms": 0.035735, "peak_rss_kb": 5036, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 310.902538, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 301.217696, "p99_ms": 310.902538, "peak_rss_kb": 7320, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 301.94926399999997, "name": "expr_neq_uuid_keyword_reverse", "p50_ms": 290.041447, "p99_ms": 301.94926399999997, "peak_rss_kb": 7476, "query": "[:find ?f :where [?f :name ?n] [(!= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 343.076866, "name": "expr_neq_keyword_reverse", "p50_ms": 332.703205, "p99_ms": 343.076866, "peak_rss_kb": 7336, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 9}, "after": {"max_ms": 299.718779, "name": "expr_neq_keyword_reverse", "p50_ms": 292.593704, "p99_ms": 299.718779, "peak_rss_kb": 7360, "query": "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 311.807269, "name": "expr_neq_uuid_keyword", "p50_ms": 303.098569, "p99_ms": 311.807269, "peak_rss_kb": 7232, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 300.150415, "name": "expr_neq_uuid_keyword", "p50_ms": 290.068694, "p99_ms": 300.150415, "peak_rss_kb": 7428, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 385.919524, "name": "expr_neq_keyword", "p50_ms": 318.54232, "p99_ms": 385.919524, "peak_rss_kb": 7284, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 10}, "after": {"max_ms": 355.640314, "name": "expr_neq_keyword", "p50_ms": 293.733113, "p99_ms": 355.640314, "peak_rss_kb": 7424, "query": "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", "rows": 166665, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 308.021793, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 298.56535, "p99_ms": 308.021793, "peak_rss_kb": 27156, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}, "after": {"max_ms": 302.07946400000003, "name": "expr_eq_uuid_keyword_reverse", "p50_ms": 290.508216, "p99_ms": 302.07946400000003, "peak_rss_kb": 26780, "query": "[:find ?f :where [?f :name ?n] [(= :031dbb04-22ac-58e7-a7c4-315e86b720d7 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 329.41391799999997, "name": "expr_eq_keyword_reverse", "p50_ms": 318.946493, "p99_ms": 329.41391799999997, "peak_rss_kb": 27184, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 296.636193, "name": "expr_eq_keyword_reverse", "p50_ms": 286.639622, "p99_ms": 296.636193, "peak_rss_kb": 27104, "query": "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 305.914403, "name": "expr_eq_uuid_keyword", "p50_ms": 295.902275, "p99_ms": 305.914403, "peak_rss_kb": 27216, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}, "after": {"max_ms": 294.303084, "name": "expr_eq_uuid_keyword", "p50_ms": 287.7614, "p99_ms": 294.303084, "peak_rss_kb": 27212, "query": "[:find ?f :where [?f :name ?n] [(= ?f :031dbb04-22ac-58e7-a7c4-315e86b720d7)]]", "rows": 1, "runs": 11}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 329.825828, "name": "expr_eq_keyword", "p50_ms": 318.900728, "p99_ms": 329.825828, "peak_rss_kb": 27868, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 10}, "after": {"max_ms": 298.956929, "name": "expr_eq_keyword", "p50_ms": 287.53636700000004, "p99_ms": 298.956929, "peak_rss_kb": 27240, "query": "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", "rows": 1, "runs": 11}} diff --git a/docs/benchmarks/774-environment-after.txt b/docs/benchmarks/774-environment-after.txt new file mode 100644 index 0000000000..54e68ced8b --- /dev/null +++ b/docs/benchmarks/774-environment-after.txt @@ -0,0 +1,21 @@ +Thu Oct 29 04:10:11 UTC 2026 +rustc 1.99.1 (58cf8f9c3 2026-10-13) +binary: rustc +commit-hash: 58cf8f9c35b355199727627d07ae34a4e2846d67 +commit-date: 2026-10-13 +host: x86_64-unknown-linux-gnu +release: 1.99.1 +LLVM version: 23.1.1 +Linux 6.8.0-139-generic +schedutil + 09:40:12 up 14 days, 23:14, 3 users, load average: 1.09, 3.07, 3.60 +%CPU COMMAND + 9.0 sshd + 2.4 atop + 0.1 kworker/0:1-events + 0.1 kworker/u176:0-poll_mpt3sas0_statu + 0.0 kworker/u176:1-poll_megasas0_status + 0.0 kworker/u177:2-events_power_efficient + 0.0 kworker/u178:2-events_power_efficient + 0.0 kworker/u177:0-events_unbound + 0.0 fail2ban-server diff --git a/docs/benchmarks/774-expression-keywords.md b/docs/benchmarks/774-expression-keywords.md new file mode 100644 index 0000000000..be0a37f828 --- /dev/null +++ b/docs/benchmarks/774-expression-keywords.md @@ -0,0 +1,171 @@ +# Literal keyword/ref expression equality (#774) + +The v3 engine resolves keyword literals in `=` / `!=` expressions when the +filter or binding operator is built and reuses those UUIDs across its rows. +The immutable cache contains only literals from that expression, including +nested expressions. Prepared slots are substituted before this step. Rule +body operators resolve again when a new full/delta operator tree is built; +rewinding an existing operator retains its resolutions. + +Dynamic operands still use the existing conversion on a cache miss, and never +populate the cache. Keyword/keyword equality, structural set equality, numeric +equality and returned value types are unchanged. The cache is expression +metadata, bounded by query text rather than input cardinality; like the parsed +expression, it is outside the query's data-memory meter. There is no global +cache, new dependency, public API or file-format change. This performance-only +change targets v3, with no v2.x backport under the support policy. + +## Measurement before implementation + +Baseline: [`bee2af00ce2008261a68993f625082fc4c8ffdb9`](https://github.com/project-minigraf/minigraf/tree/bee2af00ce2008261a68993f625082fc4c8ffdb9), +2026-10-29. The [initial measurements](774-baseline.json) ran before choosing +the implementation: two sequential rounds, reversing case order, on fresh +100K- and 1M-fact #394 fixtures. The query is: + +```datalog +[:find ?f :where [?f :name ?n] [(= ?f :p5)]] +``` + +The eight new envelope shapes cover `=` and `!=`, either operand order, +and paired UUID-keyword controls. A control replaces `:p5` with +`:031dbb04-22ac-58e7-a7c4-315e86b720d7`, naming the same entity. It still +clones a keyword and parses its UUID, but bypasses UUID-v5 hashing. Expression +syntax does not accept a `#uuid` literal (`PRS-070`), so this is not a +pre-resolved-ref control. Differences also include string length and parsing +cost; these controls do not isolate a pure SHA-1 cost or predict the cache's +complete benefit. + +At 100K, the named-keyword cases took about 30–31 ms and the controls about +28 ms. At 1M, they took about 319–323 ms and 295–302 ms respectively. This +justified a small expression-local cache, without attributing #531's old +matcher's historical 8% profile to this separate path. + +## Paired comparison + +Final comparison baseline: `v3` at `5f80732509a37e0674e40657468149c1af83acb1`, +after #723 landed during the initial run. Both baseline and change were rebuilt +on that revision for the retained final comparison. The earlier measurements +above remain evidence gathered before implementation. + +Both binaries use Rust 1.99.1 on Linux 6.8.0-139-generic, the `envelope` +profile (opt-level 3, LTO, one codegen unit), and +`RUSTFLAGS='-Cforce-frame-pointers=yes'`. The observed governor was +`schedutil`. Compilation and tests finished before timing; process/load checks +showed no competing heavy workload. Each query drains a read-only cursor in +batches of 1,000 over the same checkpointed fixture, with warm page caches. +The [build manifest](774-build.json) records the tested/measured source hashes +and dependency lockfile hash; local and remote source hashes were checked equal. +The [post-run environment check](774-environment-after.txt) records the toolchain, +governor and process/load snapshot after all timings, not continuous monitoring. + +The [comparison driver](774-compare.py) runs baseline and change concurrently +on separate sockets (CPU and memory pinned to NUMA nodes 1 and 3), swapping +nodes and reversing case order every round. Four pairs per shape and scale +use a three-second budget, at least five and at most 200 timed drains per +process. Fast point/join cases reach the 200-run cap well before three seconds; +their short duration makes them more sensitive to startup noise. With fewer +than 100 runs, the envelope's p99 is the sample maximum. This is a warm-query +comparison, not a cold-cache or production-workload claim. + +[All 96 paired records](774-comparison.jsonl) are retained. The table gives the +mean of the four process p50s, in milliseconds; negative change means faster. + +| Scale | Shape | Before (ms) | After (ms) | Change | +|---|---|---:|---:|---:| +| 100k | `expr_eq_keyword` | 29.98023 | 26.87894 | -10.34% | +| 100k | `expr_eq_uuid_keyword` | 27.84967 | 26.94552 | -3.25% | +| 100k | `expr_eq_keyword_reverse` | 30.07180 | 26.74923 | -11.05% | +| 100k | `expr_eq_uuid_keyword_reverse` | 27.81720 | 27.38756 | -1.54% | +| 100k | `expr_neq_keyword` | 30.25585 | 27.26363 | -9.89% | +| 100k | `expr_neq_uuid_keyword` | 28.06772 | 27.14339 | -3.29% | +| 100k | `expr_neq_keyword_reverse` | 30.34863 | 27.04602 | -10.88% | +| 100k | `expr_neq_uuid_keyword_reverse` | 28.12431 | 27.12391 | -3.56% | +| 100k | `point_entity` | 0.01802 | 0.01842 | +2.19% | +| 100k | `attribute_scan` | 11.35259 | 11.21210 | -1.24% | +| 100k | `join_3_selective` | 0.20989 | 0.21047 | +0.28% | +| 100k | `join_2_pseudo` | 0.04603 | 0.04593 | -0.21% | +| 1m | `expr_eq_keyword` | 319.48420 | 287.86908 | -9.90% | +| 1m | `expr_eq_uuid_keyword` | 302.44041 | 287.53118 | -4.93% | +| 1m | `expr_eq_keyword_reverse` | 319.95405 | 286.34977 | -10.50% | +| 1m | `expr_eq_uuid_keyword_reverse` | 298.90469 | 289.12424 | -3.27% | +| 1m | `expr_neq_keyword` | 320.75728 | 291.80473 | -9.03% | +| 1m | `expr_neq_uuid_keyword` | 300.73391 | 291.11344 | -3.20% | +| 1m | `expr_neq_keyword_reverse` | 323.82792 | 291.06117 | -10.12% | +| 1m | `expr_neq_uuid_keyword_reverse` | 301.18889 | 289.70200 | -3.81% | +| 1m | `point_entity` | 0.01817 | 0.01813 | -0.19% | +| 1m | `attribute_scan` | 121.51658 | 122.17158 | +0.54% | +| 1m | `join_3_selective` | 0.20553 | 0.20354 | -0.97% | +| 1m | `join_2_pseudo` | 0.04513 | 0.04559 | +1.01% | + +The named-keyword shapes improve by **9.0–11.0%** across the measured scales. +UUID-keyword controls improve by 1.5–4.9%. Attribute scans and join guards +change by at most 1.2% in either direction. Fast point-query timings +were also checked with a [20-pair repeat](774-point-check.jsonl) on the +same binaries, swapping sockets. Means of process p50s: + +| Scale | Main run point change | Repeat before (µs) | Repeat after (µs) | Repeat change | +|---|---:|---:|---:|---:| +| 100k | +2.19% | 18.631 | 18.697 | +0.35% | +| 1m | -0.19% | 18.289 | 18.144 | -0.79% | + +These short runs do not establish zero overhead or a general-query speedup. +Both the main run and focused repeat are retained. Reproduce the repeat by +adding `point` after the comparison driver’s output path. + +All 192 main-run processes and 80 focused-repeat processes completed without +errors or caps, with matching expected row counts. + +The fixture has `floor(N / 6)` named entities. Equality returns one row; +inequality returns 16,665 rows at 100K and 166,665 at 1M. The harness asserts +these expected counts and checks that every timed run returns the same count. +The comparison driver also rejects errors, caps and mismatched before/after +counts. + +## Correctness and scope + +- A test-only counter in `edn_to_entity_id` failed before the fix: 8 input rows + caused 8 keyword resolutions; 2,048 caused 2,048. After the fix the count is + independent of rows for equality/inequality in both orders, nested + expressions, binding expressions, negation, disjunction and a rule body. +- Existing semantic tests were extended with reversed inequality, nested + equality and prepared queries that alternate keyword slots across repeated + executions. They run in memory, after checkpoint and after reopen. Existing + dynamic-operand, UUID-keyword and structural-set tests also pass. +- `cargo test` after rebasing onto #723: 1,989 passed, 17 ignored. Targeted `test-hooks` runs of + `plan_independence_test` and `join_rules_test`: 31 passed. +- `cargo clippy --all-features -- -D warnings`, `cargo fmt --check`, and the + companion docs-site build passed (13 versions, 368 pages). + +The per-row binding `HashMap` and value cloning remain. Reusing `IdSpace` was +not chosen: its committed-id cache expires at pull boundaries, while these +constants belong to an expression and should survive operator rewinds. The +literal-only cache cannot grow with dynamic data. A compact vector keeps the +release binary within the existing size budget, avoiding a separate hash-map +instantiation. Lookup is linear in the expression’s distinct equality literals; +the timed expressions have one. The final release binary is 1,263,016 bytes +against a 1,263,616-byte cap. Nested/rule/prepared paths +are correctness-tested; the timed shapes are the plain literal expressions. + +## Reproduce + +Use the same [retained dependency lockfile](774-Cargo.lock) for both checkouts. Add the eight +#774 envelope shapes to the baseline checkout without changing its engine, +then build each with: + +```sh +RUSTFLAGS='-Cforce-frame-pointers=yes' cargo build --locked --profile envelope --example perf_envelope +``` + +Create fresh fixtures using the baseline binary's `__build` mode, saving each +JSON output beside its graph as `fixture-v1-100k.json` or `fixture-v1-1m.json`: + +```sh +"$before" __build "$fixtures/fixture-v1-100k.graph" 100000 > "$fixtures/fixture-v1-100k.json" +"$before" __build "$fixtures/fixture-v1-1m.graph" 1000000 > "$fixtures/fixture-v1-1m.json" +python3 docs/benchmarks/774-compare.py "$before" "$after" "$fixtures" comparison.jsonl +``` + +`before` and `after` are absolute binary paths; `fixtures` is a new scratch +directory. On this harness revision, indexes 24–31 are the eight expression +cases; indexes 0, 2, 4 and 6 are the point/scan/join guards. The baseline source +revision is unreleased v3 even though its Cargo manifest says `2.0.5`. diff --git a/docs/benchmarks/774-point-check.jsonl b/docs/benchmarks/774-point-check.jsonl new file mode 100644 index 0000000000..4d653587bc --- /dev/null +++ b/docs/benchmarks/774-point-check.jsonl @@ -0,0 +1,40 @@ +{"scale": "100k", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.071379, "name": "point_entity", "p50_ms": 0.018977, "p99_ms": 0.035271000000000004, "peak_rss_kb": 5300, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.066097, "name": "point_entity", "p50_ms": 0.018567999999999998, "p99_ms": 0.025474, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.044489, "name": "point_entity", "p50_ms": 0.018403, "p99_ms": 0.042086000000000005, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.051438, "name": "point_entity", "p50_ms": 0.01839, "p99_ms": 0.046615, "peak_rss_kb": 5280, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.058992, "name": "point_entity", "p50_ms": 0.019596, "p99_ms": 0.052754999999999996, "peak_rss_kb": 5288, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.043404, "name": "point_entity", "p50_ms": 0.018541000000000002, "p99_ms": 0.042366, "peak_rss_kb": 5272, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.059385999999999994, "name": "point_entity", "p50_ms": 0.01945, "p99_ms": 0.041167, "peak_rss_kb": 5288, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.045933, "name": "point_entity", "p50_ms": 0.018720999999999998, "p99_ms": 0.040434, "peak_rss_kb": 5272, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 4, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.060314, "name": "point_entity", "p50_ms": 0.018546, "p99_ms": 0.05078, "peak_rss_kb": 5184, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.036153, "name": "point_entity", "p50_ms": 0.019723, "p99_ms": 0.032243, "peak_rss_kb": 5180, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 5, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.085344, "name": "point_entity", "p50_ms": 0.018215000000000002, "p99_ms": 0.060565, "peak_rss_kb": 5280, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.061345000000000004, "name": "point_entity", "p50_ms": 0.018542999999999997, "p99_ms": 0.059409, "peak_rss_kb": 5292, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 6, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.078605, "name": "point_entity", "p50_ms": 0.019041, "p99_ms": 0.041696000000000004, "peak_rss_kb": 5268, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.043649, "name": "point_entity", "p50_ms": 0.018095, "p99_ms": 0.025089999999999998, "peak_rss_kb": 5184, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 7, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.042962, "name": "point_entity", "p50_ms": 0.018591, "p99_ms": 0.042311999999999995, "peak_rss_kb": 5180, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.04985, "name": "point_entity", "p50_ms": 0.018504, "p99_ms": 0.049370000000000004, "peak_rss_kb": 5288, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 8, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.040874999999999995, "name": "point_entity", "p50_ms": 0.018940000000000002, "p99_ms": 0.039433, "peak_rss_kb": 5272, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.043807000000000006, "name": "point_entity", "p50_ms": 0.019157, "p99_ms": 0.037364999999999995, "peak_rss_kb": 5184, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 9, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.034675000000000004, "name": "point_entity", "p50_ms": 0.018073000000000002, "p99_ms": 0.026390999999999998, "peak_rss_kb": 5300, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.058193999999999996, "name": "point_entity", "p50_ms": 0.019569, "p99_ms": 0.046448, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 10, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.074168, "name": "point_entity", "p50_ms": 0.020065, "p99_ms": 0.059139, "peak_rss_kb": 5300, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.043384, "name": "point_entity", "p50_ms": 0.01845, "p99_ms": 0.039960999999999997, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 11, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.050119, "name": "point_entity", "p50_ms": 0.017896, "p99_ms": 0.043794, "peak_rss_kb": 5288, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.054385, "name": "point_entity", "p50_ms": 0.018304, "p99_ms": 0.033524, "peak_rss_kb": 5272, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 12, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.060019, "name": "point_entity", "p50_ms": 0.017822, "p99_ms": 0.042873, "peak_rss_kb": 5292, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.0517, "name": "point_entity", "p50_ms": 0.018298, "p99_ms": 0.050758, "peak_rss_kb": 5180, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 13, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.051359, "name": "point_entity", "p50_ms": 0.01831, "p99_ms": 0.045154, "peak_rss_kb": 5268, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.059139, "name": "point_entity", "p50_ms": 0.020585, "p99_ms": 0.050947, "peak_rss_kb": 5268, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 14, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.057405, "name": "point_entity", "p50_ms": 0.017943999999999998, "p99_ms": 0.038493, "peak_rss_kb": 5264, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.071083, "name": "point_entity", "p50_ms": 0.017855, "p99_ms": 0.03848, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 15, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.075373, "name": "point_entity", "p50_ms": 0.018099999999999998, "p99_ms": 0.042728, "peak_rss_kb": 5192, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.085894, "name": "point_entity", "p50_ms": 0.018255, "p99_ms": 0.050598, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 16, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.05852, "name": "point_entity", "p50_ms": 0.020341, "p99_ms": 0.044325, "peak_rss_kb": 5176, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.049995, "name": "point_entity", "p50_ms": 0.019335, "p99_ms": 0.045377, "peak_rss_kb": 5300, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 17, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.034524, "name": "point_entity", "p50_ms": 0.018009999999999998, "p99_ms": 0.027953000000000002, "peak_rss_kb": 5176, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.036721000000000004, "name": "point_entity", "p50_ms": 0.017848, "p99_ms": 0.035785, "peak_rss_kb": 5300, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 18, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.051807, "name": "point_entity", "p50_ms": 0.018230999999999997, "p99_ms": 0.047435000000000005, "peak_rss_kb": 5288, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039183, "name": "point_entity", "p50_ms": 0.018782, "p99_ms": 0.035926999999999994, "peak_rss_kb": 5188, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "100k", "round": 19, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.04406, "name": "point_entity", "p50_ms": 0.018078, "p99_ms": 0.040077, "peak_rss_kb": 5180, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.04388, "name": "point_entity", "p50_ms": 0.018417, "p99_ms": 0.040456, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p8333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 0, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.053921000000000004, "name": "point_entity", "p50_ms": 0.017984, "p99_ms": 0.041392, "peak_rss_kb": 5156, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.035486, "name": "point_entity", "p50_ms": 0.017873999999999998, "p99_ms": 0.022695, "peak_rss_kb": 5256, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 1, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.025449, "name": "point_entity", "p50_ms": 0.017865, "p99_ms": 0.025026, "peak_rss_kb": 5304, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039987999999999996, "name": "point_entity", "p50_ms": 0.019423, "p99_ms": 0.034958, "peak_rss_kb": 5248, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 2, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.036513000000000004, "name": "point_entity", "p50_ms": 0.018023, "p99_ms": 0.035153000000000004, "peak_rss_kb": 5328, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.030944, "name": "point_entity", "p50_ms": 0.018024, "p99_ms": 0.022918, "peak_rss_kb": 5344, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 3, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.024217, "name": "point_entity", "p50_ms": 0.01812, "p99_ms": 0.022433, "peak_rss_kb": 5352, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039139, "name": "point_entity", "p50_ms": 0.01791, "p99_ms": 0.033604, "peak_rss_kb": 5236, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 4, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.039167, "name": "point_entity", "p50_ms": 0.018416000000000002, "p99_ms": 0.033528999999999996, "peak_rss_kb": 5160, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.027767999999999998, "name": "point_entity", "p50_ms": 0.018252, "p99_ms": 0.022738, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 5, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.02694, "name": "point_entity", "p50_ms": 0.018328, "p99_ms": 0.023356000000000002, "peak_rss_kb": 5032, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039923, "name": "point_entity", "p50_ms": 0.019077, "p99_ms": 0.034248999999999995, "peak_rss_kb": 5144, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 6, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.066133, "name": "point_entity", "p50_ms": 0.018914, "p99_ms": 0.050928, "peak_rss_kb": 5276, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.050599, "name": "point_entity", "p50_ms": 0.017972, "p99_ms": 0.035272, "peak_rss_kb": 5228, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 7, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.029153000000000002, "name": "point_entity", "p50_ms": 0.017991, "p99_ms": 0.024832, "peak_rss_kb": 5272, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.042092000000000004, "name": "point_entity", "p50_ms": 0.018968, "p99_ms": 0.023312999999999997, "peak_rss_kb": 5176, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 8, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.036119, "name": "point_entity", "p50_ms": 0.018067000000000003, "p99_ms": 0.032654999999999997, "peak_rss_kb": 5284, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.026084, "name": "point_entity", "p50_ms": 0.01761, "p99_ms": 0.022227, "peak_rss_kb": 5232, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 9, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.02903, "name": "point_entity", "p50_ms": 0.018878000000000002, "p99_ms": 0.023280000000000002, "peak_rss_kb": 5224, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.034817, "name": "point_entity", "p50_ms": 0.017852, "p99_ms": 0.026117, "peak_rss_kb": 5116, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 10, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.044105, "name": "point_entity", "p50_ms": 0.019263, "p99_ms": 0.036212, "peak_rss_kb": 5332, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.030929, "name": "point_entity", "p50_ms": 0.017993, "p99_ms": 0.02471, "peak_rss_kb": 5236, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 11, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.027218, "name": "point_entity", "p50_ms": 0.018602, "p99_ms": 0.02407, "peak_rss_kb": 5328, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039386, "name": "point_entity", "p50_ms": 0.017658, "p99_ms": 0.026996, "peak_rss_kb": 5244, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 12, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.037168, "name": "point_entity", "p50_ms": 0.018368000000000002, "p99_ms": 0.033167, "peak_rss_kb": 5268, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.035931, "name": "point_entity", "p50_ms": 0.018099999999999998, "p99_ms": 0.023377, "peak_rss_kb": 5336, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 13, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.02711, "name": "point_entity", "p50_ms": 0.018094, "p99_ms": 0.023195999999999998, "peak_rss_kb": 5336, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.036402000000000004, "name": "point_entity", "p50_ms": 0.018884, "p99_ms": 0.026384, "peak_rss_kb": 5348, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 14, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.04163, "name": "point_entity", "p50_ms": 0.018393000000000003, "p99_ms": 0.026521, "peak_rss_kb": 5152, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.02938, "name": "point_entity", "p50_ms": 0.017979, "p99_ms": 0.022442999999999998, "peak_rss_kb": 5324, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 15, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.031163, "name": "point_entity", "p50_ms": 0.017754, "p99_ms": 0.027193, "peak_rss_kb": 5144, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.05214, "name": "point_entity", "p50_ms": 0.018196999999999998, "p99_ms": 0.038828, "peak_rss_kb": 5212, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 16, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.041365, "name": "point_entity", "p50_ms": 0.018261, "p99_ms": 0.027803, "peak_rss_kb": 5240, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.028663, "name": "point_entity", "p50_ms": 0.018042000000000002, "p99_ms": 0.027344, "peak_rss_kb": 4948, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 17, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.026145, "name": "point_entity", "p50_ms": 0.01787, "p99_ms": 0.022155, "peak_rss_kb": 5320, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.039219, "name": "point_entity", "p50_ms": 0.017728999999999998, "p99_ms": 0.034808000000000006, "peak_rss_kb": 5316, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 18, "before_node": 1, "after_node": 3, "before": {"max_ms": 0.043049000000000004, "name": "point_entity", "p50_ms": 0.018402, "p99_ms": 0.035282, "peak_rss_kb": 5028, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.035404000000000005, "name": "point_entity", "p50_ms": 0.017699, "p99_ms": 0.022763, "peak_rss_kb": 5244, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} +{"scale": "1m", "round": 19, "before_node": 3, "after_node": 1, "before": {"max_ms": 0.027053999999999998, "name": "point_entity", "p50_ms": 0.018181, "p99_ms": 0.024329999999999997, "peak_rss_kb": 5328, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}, "after": {"max_ms": 0.037584, "name": "point_entity", "p50_ms": 0.01763, "p99_ms": 0.032632999999999995, "peak_rss_kb": 5248, "query": "[:find ?a :where [:p83333 :age ?a]]", "rows": 1, "runs": 200}} diff --git a/examples/perf_envelope.rs b/examples/perf_envelope.rs index 3b168722a0..cfb52e9254 100644 --- a/examples/perf_envelope.rs +++ b/examples/perf_envelope.rs @@ -537,7 +537,7 @@ fn shapes(e: usize, tx_half: u64, tx_half_time: &str, hot_tx_half: u64) -> Vec 0) .count(); - vec![ + let mut out = vec![ Shape { name: "point_entity", query: format!("[:find ?a :where [:p{m} :age ?a]]"), @@ -708,7 +708,38 @@ fn shapes(e: usize, tx_half: u64, tx_half_time: &str, hot_tx_half: u64) -> Vec 5); + out.push(Shape { + name, + query: format!("[:find ?f :where [?f :name ?n] [({op} {operands})]]"), + rows: if op == "=" { equal } else { e - equal }, + }); + } + out } #[cfg(not(target_arch = "wasm32"))] @@ -993,8 +1024,10 @@ mod tests { .path(fixture) .open() .unwrap(); - for name in ["as_of_ts", "as_of_ts_scan"] { - let shape = shapes.iter().find(|s| s.name == name).unwrap(); + for shape in shapes.iter().filter(|s| { + matches!(s.name, "as_of_ts" | "as_of_ts_scan") || s.name.starts_with("expr_") + }) { + let name = shape.name; let rows = drain(&db, &format!("(query {})", shape.query)).unwrap(); assert!(rows >= 1, "{name} returns rows"); if shape.rows != usize::MAX { diff --git a/src/query/datalog/executor.rs b/src/query/datalog/executor.rs index c9d9e33aaf..41f3b0b58a 100644 --- a/src/query/datalog/executor.rs +++ b/src/query/datalog/executor.rs @@ -8,7 +8,7 @@ use super::types::{ use crate::error::{ErrorCode, bail_coded, err_coded}; use crate::graph::FactStorage; use crate::graph::storage::Snapshot; -use crate::graph::types::{TransactOptions, TxId, Value}; +use crate::graph::types::{EntityId, TransactOptions, TxId, Value}; use anyhow::Result; use std::collections::HashMap; use std::sync::{Arc, RwLock}; @@ -622,22 +622,60 @@ fn to_float_pair(l: &Value, r: &Value) -> Result<(f64, f64), ()> { Ok((lf, rf)) } +/// Entity equivalents of literal keywords in an expression's equality tests. +/// Built with the operator, including nested expressions and substituted slots. +/// Never populated from row values: its size is bounded by the expression, not +/// the input, and rewinding an operator keeps the same resolutions (#774). +#[derive(Default)] +pub(crate) struct LiteralKeywords(Vec<(String, EntityId)>); + +impl LiteralKeywords { + pub(crate) fn new(expr: &Expr) -> Self { + fn walk(expr: &Expr, out: &mut Vec<(String, EntityId)>) { + match expr { + Expr::BinOp(op, lhs, rhs) => { + if matches!(op, BinOp::Eq | BinOp::Neq) { + for arg in [lhs, rhs] { + if let Expr::Lit(Value::Keyword(k)) = &**arg + && !out.iter().any(|(name, _)| name == k) + && let Ok(id) = edn_to_entity_id(&EdnValue::Keyword(k.clone())) + { + out.push((k.clone(), id)); + } + } + } + walk(lhs, out); + walk(rhs, out); + } + Expr::UnaryOp(_, arg) => walk(arg, out), + _ => {} + } + } + let mut out = Self::default(); + walk(expr, &mut out.0); + out + } +} + /// Whether `l` and `r` are equal as a join compares them: structurally, /// except that a keyword equals a ref to the entity it names (#744). -fn expr_eq(l: &Value, r: &Value) -> bool { +fn expr_eq(l: &Value, r: &Value, keywords: &LiteralKeywords) -> bool { match (l, r) { (Value::Keyword(k), Value::Ref(u)) | (Value::Ref(u), Value::Keyword(k)) => { - edn_to_entity_id(&EdnValue::Keyword(k.clone())).is_ok_and(|e| e == *u) + match keywords.0.iter().find(|(name, _)| name == k) { + Some((_, e)) => e == u, + None => edn_to_entity_id(&EdnValue::Keyword(k.clone())).is_ok_and(|e| e == *u), + } } _ => l == r, } } -fn eval_binop(op: &BinOp, l: Value, r: Value) -> Result { +fn eval_binop(op: &BinOp, l: Value, r: Value, keywords: &LiteralKeywords) -> Result { match op { // Equality — works for all Value variants; no type mismatch error. - BinOp::Eq => return Ok(Value::Boolean(expr_eq(&l, &r))), - BinOp::Neq => return Ok(Value::Boolean(!expr_eq(&l, &r))), + BinOp::Eq => return Ok(Value::Boolean(expr_eq(&l, &r, keywords))), + BinOp::Neq => return Ok(Value::Boolean(!expr_eq(&l, &r, keywords))), _ => {} } @@ -829,12 +867,13 @@ pub(crate) fn eval_expr( expr: &Expr, binding: &std::collections::HashMap, registry: Option<&FunctionRegistry>, + keywords: &LiteralKeywords, ) -> Result { match expr { Expr::Var(v) => binding.get(v).cloned().ok_or(EvalError::NoValue), Expr::Lit(val) => Ok(val.clone()), Expr::UnaryOp(op, arg) => { - let v = eval_expr(arg, binding, registry)?; + let v = eval_expr(arg, binding, registry, keywords)?; match op { UnaryOp::StringQ => Ok(Value::Boolean(matches!(v, Value::String(_)))), UnaryOp::IntegerQ => Ok(Value::Boolean(matches!(v, Value::Integer(_)))), @@ -857,9 +896,9 @@ pub(crate) fn eval_expr( } } Expr::BinOp(op, lhs, rhs) => { - let l = eval_expr(lhs, binding, registry)?; - let r = eval_expr(rhs, binding, registry)?; - eval_binop(op, l, r).map_err(|()| EvalError::NoValue) + let l = eval_expr(lhs, binding, registry, keywords)?; + let r = eval_expr(rhs, binding, registry, keywords)?; + eval_binop(op, l, r, keywords).map_err(|()| EvalError::NoValue) } Expr::Slot(_) => { // Unsubstituted bind slot — treat as eval error (unbound variable equivalent). @@ -2036,6 +2075,18 @@ mod expr_eval_tests { use std::sync::Arc; use uuid::Uuid; + fn eval_expr( + expr: &Expr, + binding: &HashMap, + registry: Option<&FunctionRegistry>, + ) -> Result { + super::eval_expr(expr, binding, registry, &LiteralKeywords::new(expr)) + } + + fn eval_binop(op: &BinOp, l: Value, r: Value) -> Result { + super::eval_binop(op, l, r, &LiteralKeywords::default()) + } + fn b(pairs: &[(&str, Value)]) -> HashMap { pairs .iter() diff --git a/src/query/datalog/matcher.rs b/src/query/datalog/matcher.rs index 6f853b1ea4..27fb78102e 100644 --- a/src/query/datalog/matcher.rs +++ b/src/query/datalog/matcher.rs @@ -2,6 +2,12 @@ use super::types::EdnValue; use crate::graph::types::{EntityId, Value, ValueSet}; use uuid::Uuid; +#[cfg(test)] +thread_local! { + /// #774: count conversions, independently of wall-clock timing. + pub(crate) static KEYWORD_RESOLUTIONS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + /// Convert EdnValue to Value for storage pub fn edn_to_value(edn: &EdnValue) -> Result { match edn { @@ -32,6 +38,8 @@ pub fn edn_to_value(edn: &EdnValue) -> Result { pub fn edn_to_entity_id(edn: &EdnValue) -> Result { match edn { EdnValue::Keyword(k) => { + #[cfg(test)] + KEYWORD_RESOLUTIONS.with(|n| n.set(n.get() + 1)); // Convert keyword to deterministic UUID // For now, we'll use a simple hash-based approach // In production, you might want a more sophisticated method diff --git a/src/query/engine/filter.rs b/src/query/engine/filter.rs index b583075e06..945efb504b 100644 --- a/src/query/engine/filter.rs +++ b/src/query/engine/filter.rs @@ -9,7 +9,7 @@ use super::cell::{Cell, join_eq}; use super::plan::{Out, Step, Term, Vars}; use super::project::value; use super::{Counters, Ctx, Operator}; -use crate::query::datalog::executor::{EvalError, eval_expr, is_truthy}; +use crate::query::datalog::executor::{EvalError, LiteralKeywords, eval_expr, is_truthy}; use crate::query::datalog::types::Expr; use anyhow::Result; use std::collections::HashMap; @@ -19,10 +19,15 @@ pub(crate) struct Apply { child: Box, step: Step, counters: Counters, + keywords: LiteralKeywords, } impl Apply { pub(crate) fn new(child: Box, step: Step) -> Self { + let keywords = match &step { + Step::Filter(expr, _) | Step::Bind(expr, ..) => LiteralKeywords::new(expr), + _ => LiteralKeywords::default(), + }; let op = match step { Step::Pseudo { .. } => "Pseudo", Step::Filter(..) => "Filter", @@ -41,6 +46,7 @@ impl Apply { child, step, counters: Counters::new(op), + keywords, } } } @@ -49,7 +55,7 @@ impl Operator for Apply { fn next_batch(&mut self, ctx: &mut Ctx<'_>) -> Result> { while let Some(batch) = self.child.next_batch(ctx)? { self.counters.rows_in += batch.len as u64; - let batch = apply(&self.step, batch, ctx)?; + let batch = apply(&self.step, &self.keywords, batch, ctx)?; if batch.len > 0 { self.counters.out(&batch); return Ok(Some(batch)); @@ -73,7 +79,12 @@ impl Operator for Apply { } /// Apply `step` to `batch`. -fn apply(step: &Step, mut batch: Batch, ctx: &mut Ctx<'_>) -> Result { +fn apply( + step: &Step, + keywords: &LiteralKeywords, + mut batch: Batch, + ctx: &mut Ctx<'_>, +) -> Result { match step { Step::Pseudo { col, value } => { let meta = batch.cols.get(*col).cloned().unwrap_or_default(); @@ -100,7 +111,9 @@ fn apply(step: &Step, mut batch: Batch, ctx: &mut Ctx<'_>) -> Result { Step::Filter(expr, vars) => { let mut keep = Vec::with_capacity(batch.len); for i in 0..batch.len { - keep.push(eval(expr, vars, &batch, i, ctx)?.is_some_and(|v| is_truthy(&v))); + keep.push( + eval(expr, keywords, vars, &batch, i, ctx)?.is_some_and(|v| is_truthy(&v)), + ); } batch.retain(&keep); } @@ -108,7 +121,7 @@ fn apply(step: &Step, mut batch: Batch, ctx: &mut Ctx<'_>) -> Result { let mut keep = Vec::with_capacity(batch.len); let mut out = Vec::with_capacity(batch.len); for i in 0..batch.len { - let Some(v) = eval(expr, vars, &batch, i, ctx)? else { + let Some(v) = eval(expr, keywords, vars, &batch, i, ctx)? else { keep.push(false); continue; }; @@ -154,6 +167,7 @@ fn apply(step: &Step, mut batch: Batch, ctx: &mut Ctx<'_>) -> Result { /// predicate fails the query (`QRY-014`, #180). fn eval( expr: &Expr, + keywords: &LiteralKeywords, vars: &Vars, batch: &Batch, i: usize, @@ -165,9 +179,48 @@ fn eval( binding.insert(name.clone(), value(cell, ctx)?); } } - match eval_expr(expr, &binding, Some(ctx.functions)) { + match eval_expr(expr, &binding, Some(ctx.functions), keywords) { Ok(v) => Ok(Some(v)), Err(EvalError::NoValue) => Ok(None), Err(EvalError::Udf(e)) => Err(e), } } + +#[cfg(test)] +mod tests { + use crate::Minigraf; + use crate::query::datalog::matcher::KEYWORD_RESOLUTIONS; + + /// Literal resolution work must not grow with the number of input rows, + /// including nested expressions and operators inside rule/negation bodies. + #[test] + fn literal_keyword_resolution_is_independent_of_row_count() { + let cases = [ + "[:find ?f :where [?f :name ?n] [(= ?f :p5)]]", + "[:find ?f :where [?f :name ?n] [(= :p5 ?f)]]", + "[:find ?f :where [?f :name ?n] [(!= ?f :p5)]]", + "[:find ?f :where [?f :name ?n] [(!= :p5 ?f)]]", + "[:find ?f :where [?f :name ?n] [(= (= ?f :p5) true)]]", + "[:find ?b :where [?f :name ?n] [(= :p5 ?f) ?b]]", + "[:find ?f :where [?f :name ?n] (not [(= ?f :p5)])]", + "[:find ?f :where [?f :name ?n] (or [(= ?f :p5)] [(= ?f :p6)])]", + "[:find ?f :where (chosen ?f)]", + ]; + let counts = |rows| { + let db = Minigraf::in_memory().unwrap(); + let facts: String = (0..rows).map(|i| format!("[:p{i} :name {i}]")).collect(); + db.execute(&format!("(transact [{facts}])")).unwrap(); + db.execute("(rule [(chosen ?f) [?f :name ?n] [(= ?f :p5)]])") + .unwrap(); + cases.map(|q| { + KEYWORD_RESOLUTIONS.with(|n| n.set(0)); + db.execute(&format!("(query {q})")).unwrap(); + KEYWORD_RESOLUTIONS.with(|n| n.get()) + }) + }; + let (small, large) = (counts(8), counts(2_048)); + for ((a, b), q) in small.into_iter().zip(large).zip(cases) { + assert_eq!(a, b, "literal resolution count grows with input: {q}"); + } + } +} diff --git a/tests/join_rules_test.rs b/tests/join_rules_test.rs index 8b4662f658..d10185171a 100644 --- a/tests/join_rules_test.rs +++ b/tests/join_rules_test.rs @@ -281,8 +281,14 @@ fn assert_expression_equality_matches_joins(db: &Minigraf) { ("[:find ?x :where [?x :ref/friend ?g] [(= ?g :bob)]]", 1), ("[:find ?x :where [?x :ref/friend ?g] [(= :bob ?g)]]", 1), ("[:find ?x :where [?x :ref/friend ?g] [(!= ?g :bob)]]", 0), + ("[:find ?x :where [?x :ref/friend ?g] [(!= :bob ?g)]]", 0), ("[:find ?x :where [?x :ref/friend ?g] [(= ?g :eve)]]", 0), ("[:find ?x :where [?x :ref/friend ?g] [(!= ?g :eve)]]", 1), + ("[:find ?x :where [?x :ref/friend ?g] [(!= :eve ?g)]]", 1), + ( + "[:find ?x :where [?x :ref/friend ?g] [(= (= :bob ?g) true)]]", + 1, + ), // A ref against a keyword value. ( "[:find ?x :where [?y :ref/friend ?g] [?x :kw/friend ?k] [(= ?g ?k)]]", @@ -310,6 +316,27 @@ fn assert_expression_equality_matches_joins(db: &Minigraf) { .unwrap(), ); assert_eq!(r.len(), 1, "bound ref"); + + // #774: each execution resolves its substituted keyword; an earlier + // execution's literal must not leak into a later one. Cover both operand + // orders and keep the keyword spelling in the returned value. + for (op, reverse) in [("=", false), ("=", true), ("!=", false), ("!=", true)] { + let args = if reverse { "$k ?g" } else { "?g $k" }; + let p = db + .prepare(&format!( + "(query [:find ?x :where [?x :ref/friend ?g] [({op} {args})]])" + )) + .unwrap(); + for k in [":bob", ":eve", ":bob"] { + let r = rows( + p.execute(&[("k", BindValue::Val(Value::Keyword(k.into())))]) + .unwrap(), + ); + assert_eq!(r.len(), usize::from((k == ":bob") == (op == "="))); + } + } + let r = query(db, "[:find ?k :where [?x :kw/friend ?k] [(= ?k :bob)]]"); + assert!(matches!(r.as_slice(), [row] if is_keyword(&row[0], ":bob"))); } #[test]