Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
89382f4
Require arctic 0.1.11 and ps-reclaim 0.1.4
Sep 7, 2026
93b938e
Write down what a data page has to say about itself
Sep 7, 2026
5dcbf21
Map paper two onto evidence that already exists
Sep 7, 2026
1cd8301
Cut the page run with as_chunks, which is what CI's clippy asks for
Sep 7, 2026
440c452
Run the formatting check CI was missing
Sep 7, 2026
89b5860
Backfill the change log to 0.3.10
Sep 7, 2026
cce51f6
Name the cause of a persistence event gap, not only its symptom
Sep 7, 2026
f6447e9
Acknowledge orphaned index events before propagating the error
Sep 7, 2026
670fca9
Stop copying the page list every time a page is appended
Sep 8, 2026
08cc865
Let the page directory reach past 64 MiB, and measure the insert path
Sep 8, 2026
c852f95
Measure insert latency as two populations, not one distribution
Sep 8, 2026
db5e283
Borrow the page on the link read instead of cloning its Arc
Sep 8, 2026
f30eff4
Call the insert benchmark what it measures
Sep 8, 2026
ac66ae0
Take WorkTable off tokio::fs, let a persisted table choose its page size
Sep 9, 2026
bb495f9
Take WorkTable off tokio's sync, time and vacuum spawn
Sep 9, 2026
6301d1a
Take the parking_lot fork, not vanilla
Sep 9, 2026
36bec76
Take the last of tokio out, and stop shipping it in the macro
Sep 9, 2026
d5f2981
Say where vanilla parking_lot actually comes from now
Sep 9, 2026
2702c06
Stop two tests sharing one table directory, and let the watermark say…
Sep 9, 2026
e201de2
feat: add columnar fields and clustered indexes
Aug 5, 2026
c495ace
fix: harden columnar side-index design
Aug 6, 2026
0f023d0
fix: land the columnar work on the post-off-tokio tree
Sep 9, 2026
c3de262
fix: keep the columnar work inside the no_std boundary
Sep 9, 2026
030f2ac
Format the two files the tokio removal left unformatted
Sep 9, 2026
26e6ce0
Add the RuntimeBackend model
Sep 9, 2026
acec196
Parse the runtime section and its section annotation
Sep 9, 2026
9539166
Record the runtime profile a query section names
Sep 9, 2026
f4a7cc0
Accept runtime in the free-order section loop
Sep 9, 2026
b74d810
Add a Runtime trait with nagoya and tokio backends
Sep 9, 2026
e5409cc
Add a compile-fail harness for the rules `worktable!` refuses
Sep 9, 2026
2330055
Add draft compile-fail cases for the runtime backend contract
Sep 9, 2026
d6fe47e
Turn the declared runtime into the type the table names
Sep 9, 2026
098d6f1
Say where two expansions differ, not just that they do
Sep 9, 2026
57f869c
Reconcile the runtime lanes that were built in parallel
Sep 9, 2026
ae07c98
Add the runtimes! profile macro and its backend marker
Sep 9, 2026
292e72a
Add .runtime() to the builder-returning selects
Sep 9, 2026
10ad846
Let a tokio profile need the tokio backend to be in the graph
Sep 9, 2026
368c2bf
Keep the compile-fail corpus out of the round-trip scan
Sep 9, 2026
02cd7d0
Let a no_std build name a runtime it cannot spawn on
Sep 9, 2026
f51097c
Make the runtime backend support policy a test
Sep 9, 2026
d1ade6f
Fail the build when a new test spawns tokio tasks on one thread
Sep 9, 2026
9914d41
Write down the whole worktable! DSL, and the runtime syntax proposed …
Sep 9, 2026
f9aadd2
Stop emitting a runtime type into a build that has no runtime
Sep 9, 2026
976915a
Call this 1.9.0-alpha1
Sep 9, 2026
5691cef
Take the patch block out and require the versions by caret
Sep 9, 2026
a4c8753
Prove what a columnar capacity failure leaves behind
Sep 10, 2026
a69afe5
Let `check` read a columnar declaration
Sep 10, 2026
4a421cc
Make a flavor a byte, and look its pool up by index
Sep 10, 2026
97f7e3e
Let a schema name every flavor the registry has
Sep 10, 2026
f9be54a
Add the flavors the sweep found, and the knobs that found them
Sep 10, 2026
6f253e4
Settle the default, and give the read-mostly shape a flavor
Sep 10, 2026
d1ecb3f
Make the default the flavor that cannot collapse
Sep 10, 2026
fe44120
Name the tuning overrides instead of positioning them
Sep 10, 2026
5fa24e1
Stop depending on the queues underneath nagoya
Sep 10, 2026
4f70454
Pin the persisted batch save bug with a failing test
Sep 10, 2026
ed0368c
Expose the pool for one flavor, so per-class routing can be measured
Sep 10, 2026
362471a
Close the page gap that made the batch save parse a hole
Sep 10, 2026
c9c51bf
Stop sleeping 500ms on a collection retry that needs no wait
Sep 10, 2026
6419899
Select batch operations in event order, not page order
Sep 10, 2026
d4e1345
Un-ignore the concurrent persisted upsert test
Sep 10, 2026
304934e
Run the eight spawning tests on a real multi-thread runtime
Sep 10, 2026
3eaa641
Replace the retry-sleep timing test with the predicate it guards
Sep 10, 2026
354e614
Bound every test failure at 5 seconds
Sep 10, 2026
2e82902
Stop the macro emitting std-only names into a no_std consumer
Sep 10, 2026
8390ba4
Add the no_std verifier, and fix the four holes it found
Sep 10, 2026
2123a96
Prove the no_std operations compile, not just the declaration
Sep 10, 2026
84fe98e
Carry columnar through the schema type and the emitter
Sep 10, 2026
810e6e4
Skip the refusal corpus when dumping schemas
Sep 10, 2026
27a0952
Bring the user guide up to 1.9
Sep 10, 2026
dea24f6
Rewrite the guide around worked examples
Sep 10, 2026
1704409
Stop tracking generated PDFs
Sep 10, 2026
cb31c6a
Say what 1.9 changed, in the three places that never mentioned it
Sep 10, 2026
dd6ab91
Generate a Vec-backed table from the same declaration
Sep 10, 2026
df2e0cf
Honour the index backend in worktable_vec!, and default it to arctic
Sep 10, 2026
26b3dcd
Refuse a duplicate in one traversal, and stop refusing congee
Sep 10, 2026
c3fd94c
Stop this test claiming to measure parity, which it cannot
Sep 10, 2026
0f18ff0
Stop claiming the two macros are interchangeable, because they are not
Sep 10, 2026
a46fca3
Give the Vec row its own name, so both macros can declare one table
Sep 10, 2026
e98154a
Fold the Vec table into worktable! as `storage: vec`, and give it hyd…
Sep 10, 2026
9634999
Close the mutation and capacity gaps a Vec table still had
Sep 10, 2026
b23519e
Fold PR 105's review findings, minus the one already fixed here
Sep 10, 2026
8de0ae7
Stop making four crates part of the macro's contract
Sep 10, 2026
6735b82
Spell it `vec: true`, and forbid `persist` beside it
Sep 10, 2026
b76a1bd
Write down where an index stops paying for itself
Sep 11, 2026
3216266
Finish deleting worktable_vec!
Sep 11, 2026
077585b
Take the lint the newest stable added
Sep 11, 2026
fc610b6
Require partition_max_size beside partition_by
Sep 11, 2026
b93e729
Format the nine files that had drifted
Sep 11, 2026
2459be1
Let a vec: true table be partitioned
Sep 11, 2026
29a4fe5
Generate a dense table for a narrow partition_max_size
Sep 11, 2026
d363974
Lint a narrow key off a partition, and model the dense one under loom
Sep 11, 2026
8776ee1
Port AtomicKeyTable, the last thing only worktable-vec had
Sep 11, 2026
9a61b84
Make the checker accept a storage the macro already does
Sep 11, 2026
0ba49fa
Propagate 1.9 into the guide, and write the partition comparison
Sep 11, 2026
f802ddd
Put the WTI leaf width on the call site
Sep 11, 2026
c18b9e4
Give the Vec table the two things its index was already doing
Sep 11, 2026
a95c8b0
Survey which declarations could take a hash index, and find none
Sep 11, 2026
1c785a1
Record the inline collect spike where the next audit will find it
Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pdf binary
12 changes: 12 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ permissions:
contents: read

jobs:
# `scripts/ci-local.sh` runs `cargo fmt --all --check` as its first step. CI
# did not, which made the script stricter than CI instead of equal to it, and
# formatting drift reached master unnoticed. Same command, same arguments.
fmt:
name: Formatting
runs-on: ubicloud-standard-2
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Formatting (cargo fmt --all --check)
run: cargo fmt --all --check

build:
name: Build and test (${{ matrix.name }})
runs-on: ubicloud-standard-2
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ tests/data/*
# cargo-mutants run output
/mutants.out/
/mutants.out.old/

# Generated documents. `docs/wt-user-guide.typ` and the columnar guide are the
# sources; the PDFs are build output and were tracked, so every edit to a guide
# put a new binary blob in the history. Rebuild with:
# typst compile docs/wt-user-guide.typ docs/wt-user-guide.pdf
*.pdf
.DS_Store
951 changes: 951 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

132 changes: 110 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["codegen", "dsl", "examples", "performance_measurement", "performance

[package]
name = "worktable"
version = "1.0.0-beta.19"
version = "1.9.0-alpha1"
edition = "2024"
authors = ["Handy-caT"]
license = "MIT"
Expand All @@ -15,8 +15,31 @@ keywords = ["database", "embedded", "in-memory", "index", "storage"]
categories = ["database-implementations", "data-structures", "caching"]

[features]
default = ["wti-predictable-search"]
default = ["std", "wti-predictable-search", "vanilla-index"]
# `futures/std` belongs here rather than on the dependency
# line: written as `features = ["std"]` beside the version, a
# `--no-default-features` build of this crate would still turn them on. The
# s3 tests reach `futures::io`, whose traits live behind that feature.
std = ["nagoya/std", "ps-reclaim/std", "congee/std", "indexset/std", "futures/std", "worktable_codegen/std"]
# The tokio backend for `Runtime`, selectable with `runtime: tokio` in a
# schema. **Off, and it stays off.** Getting tokio out of the normal dependency
# graph is the work this builds on: it used to arrive through the `tokio::`
# paths `worktable!` emitted into consumer crates, so a runtime was part of the
# macro's contract whether a consumer ran one or not. The check is
# `cargo tree -e normal -i tokio` printing nothing in the default feature set.
tokio-runtime = ["dep:tokio", "std"]
# The upstream IndexSet backend, selectable per index with `using indexset`.
# Optional because it reaches `crossbeam-utils`, `parking_lot` and `serde`,
# none of which build without `std`, and because it is one backend of four
# rather than something the table needs.
vanilla-index = ["dep:vanilla_indexset"]
perf_measurements = ["dep:performance_measurement", "dep:performance_measurement_codegen"]
# Test-only, and empty on purpose: it compiles the four-backend arms of
# `tests/worktable/runtime_backends.rs`, which declare `runtime:` on a table.
# Off by default because the DSL keyword and the `Runtime` trait land
# separately, and a default-on flag would make this branch red until they do.
# The arm that runs today declares no runtime and is not behind this flag.
runtime-backends = []
s3-support = ["dep:rusty-s3", "dep:url", "dep:reqwest", "dep:walkdir", "worktable_codegen/s3-support"]
# Moves unique WorkTablesIndex structural CDC work out of the table mutation
# path and into the background persistence worker. The persisted page format
Expand All @@ -35,54 +58,119 @@ versioned-row-publication = ["worktable_codegen/versioned-row-publication"]
[dependencies]
# Read-mostly snapshots own page Arcs while the fixed directory supplies a
# pointer-only fast path. Publication is append-only and asserted at each swap.
arc-swap = "1"
arc-swap = { version = "1", default-features = false }
async-trait = "0.1"
arctic = { package = "arctic-wt", version = "^0.1, >=0.1.9", default-features = false, features = ["smr-ps-reclaim"] }
congee = { package = "congee-wt", version = "^0.4, >=0.4.4" }
convert_case = "0.6"
crc32fast = "1"
data_bucket = { version = "^0.5, >=0.5.7" }
derive_more = { version = "2", features = ["from", "error", "display", "debug", "into"] }
arctic = { package = "arctic-wt", version = "^0.1, >=0.1.11", default-features = false, features = ["smr-ps-reclaim"] }
# `default-features = false`, or its `std` turns `ps-reclaim/std` on and this
# crate links the standard library through a dependency. That matters for
# EKOPathRS bootstrapping, which is what `no_std` here is for, not for any
# bare-metal target: we ship on Linux, macOS and Windows.
congee = { package = "congee-wt", version = "^0.4, >=0.4.4", default-features = false }
convert_case = { version = "0.6", default-features = false }
crc32fast = { version = "1", default-features = false }
# 0.6 because the page stride is a parameter now and the error type is
# concrete: `^0.5` cannot resolve the crate this depends on.
data_bucket = { version = "^0.6" }
derive_more = { version = "2", default-features = false, features = ["from", "error", "display", "debug", "into"] }
eyre = "0.6"
fastrand = "2"
futures = "0.3"
hashbrown = "0.15"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
# The file traits and the host implementation. `std` here; the crate takes it
# without default features wherever the filesystem is not involved.
# `^0.1.1` and not `^0.1`: 0.1.1 is the first release with
# `Runtime::with_tuning`, which is the only way to get a pool at a chosen
# tuning whose threads are marked as pool workers, and that marker is what
# makes `local_wakes` do anything. Against 0.1.0 this crate does not build,
# and naming the version says so rather than leaving a resolver to.
#
# It also re-exports `Tuning`, which is why `ps-st3` is no longer a direct
# dependency here: it was named for that one type.
nagoya = { version = "^0.1.1", default-features = false }
indexset = { package = "WorkTablesIndex", version = "^0.0, >=0.0.12", default-features = false, features = ["concurrent", "cdc", "multimap"] }
vanilla_indexset = { package = "indexset", version = "0.15", features = ["concurrent", "cdc", "multimap"] }
# Pulls `serde` and `serde_core` into every build, and nothing here uses them.
# They are not reachable from this line: `indexset` 0.15 declares `ftree` with
# `features = ["serde"]` unconditionally, so no `default-features = false` here
# removes them and forking `ftree` would not either. This is one of four
# selectable index backends and making it optional is the fix.
vanilla_indexset = { package = "indexset", version = "0.15", features = ["concurrent", "cdc", "multimap"], optional = true }
# indexset = { path = "../indexset", version = "0.15.0", features = ["concurrent", "cdc", "multimap"] }
# indexset = { package = "wt-indexset", version = "^0.12", features = ["concurrent", "cdc", "multimap"] }
log = "0.4"
ordered-float = "5"
parking_lot = "0.12"
log = { version = "0.4", default-features = false }
ordered-float = { version = "5", default-features = false }
# The house fork, not vanilla: `parking_lot_lite_hack` is what every other
# consumer here takes. Same crate name via `package`, so no call site changes.
#
# Vanilla is still in the default-feature graph, and no longer for the reason
# it was: it used to arrive through tokio, and now arrives through `indexset
# 0.15` behind the `vanilla-index` default feature. So it is gone from a
# `--no-default-features` build and present in a normal one, until that backend
# is deselected.
#
# Two copies of the fork are also in the lock, because `WorkTablesIndex` takes
# the published 0.12.7 while this takes the branch. That is not a version skew
# to wait out: 0.12.7's own module comment says `FairMutex` is among what it
# removed, so the branch is the only copy that has what is used here. It
# collapses when the branch publishes as 0.12.8.
parking_lot = { package = "parking_lot_lite_hack", git = "https://github.com/pathscale/parking_lot_lite_hack", branch = "feat/fair-mutex", default-features = false }
performance_measurement = { path = "performance_measurement", version = "^0.1", optional = true }
performance_measurement_codegen = { path = "performance_measurement/codegen", version = "^0.1", optional = true }
prettytable-rs = "0.10"
psc-nanoid = { version = "3", features = ["rkyv", "packed"] }
rkyv = { version = "0.8", features = ["uuid-1"] }
rkyv = { version = "0.8", default-features = false, features = ["alloc", "bytecheck", "uuid-1"] }
reqwest = { version = "0.12", optional = true, default-features = false, features = ["rustls-tls-webpki-roots", "charset", "http2"] }
ps-reclaim = { version = "^0.1, >=0.1.3" }
rustc-hash = "2"
# `spin` rather than `std`: without it this crate reaches for `thread_local!`,
# which needs a platform. See its `slot` module for what it falls back to.
ps-reclaim = { version = "^0.1, >=0.1.4", default-features = false, features = ["spin"] }
rustc-hash = { version = "2", default-features = false }
rusty-s3 = { version = "0.10", optional = true }
smart-default = "0.7"
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
# Optional, off by default, and reachable only through the `tokio-runtime`
# feature. See that feature for why this is not a plain dependency. The feature
# list is what `TokioRt` calls and no more: `full` would put an I/O driver and
# a process reaper in the graph for a backend that only schedules.
tokio = { version = "1", default-features = false, features = [
"rt-multi-thread",
"sync",
"time",
], optional = true }
tracing = { version = "0.1", default-features = false }
url = { version = "2", optional = true }
uuid = { version = "1", features = ["v4", "v7"] }
walkdir = { version = "2", optional = true }
# These pre-release workspace crates move as one train. The explicit caret
# keeps the dependency policy consistent while the local path selects this
# checkout during validation.
worktable_codegen = { path = "codegen", version = "^1.0.0-beta.19" }
worktable_codegen = { path = "codegen", version = "^1.9.0-alpha1" }
# Re-exported below. Each generated table carries its declaration as a const
# whose documentation says to read it with `worktable_dsl::Schema::parse`; that
# instruction is only true if a plain `worktable` dependency can reach the
# crate.
worktable_dsl = { path = "dsl", version = "^1.0.0-beta.18.1" }
worktable_dsl = { path = "dsl", version = "^1.0.0-beta.19" }

[dev-dependencies]
chrono = "0.4"
# For one test, and only one: the flavor registry lives here and the DSL
# carries a mirror of it so the parser does not have to depend on the runtime
# crate. A dev-dependency is what lets a test compare the two lists without
# putting the mirror's `syn` and `proc-macro2` into anybody's runtime graph.
worktable_dsl = { path = "dsl" }
criterion = { version = "0.5", features = ["async_tokio"] }
rand = "0.9"
# A dev-dependency, and that is the whole of the no_std claim. It was a normal
# dependency with every feature on, so `cargo tree --no-default-features -e
# normal -i tokio` found it linked into a build that had asked for no std at
# all. `cargo check --no-default-features` passed the entire time, because it
# only ever proved this crate's own source was std-free and never its closure.
# What kept it there was not the engine: it was six `tokio::` paths emitted by
# `worktable!` into consumer crates, which made the runtime part of the macro's
# contract. Those go through `worktable::prelude` now.
tokio = { version = "1", features = ["full"] }
tracing-subscriber = "0.3"
# Drives `tests/ui.rs`. Half of what `worktable!` promises is a refusal, and a
# refusal is only testable by compiling something that must not compile. The
# expected diagnostic is a committed `.stderr` beside each case, so the test
# asserts on the message and not merely on failure.
trybuild = "1"

# Only under `--cfg loom`, so a normal build and a normal `cargo test` never
# resolve it. See src/partition/loom_tests.rs for how to run the models.
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ from a macro, and that persisting it is one feature flag away.
cargo add worktable@1.0.0-beta.5
```

## New in 1.9

- **`no_std`.** `default-features = false` and the macro still works. Persistence,
vacuum and the disk index need an operating system and are gated out.
- **Columnar fields and indexes.** `columnar` on a column, `columnar_indexes` with
`cluster_by`, so a scan over one field reads only that field's bytes.
- **A schema-selected runtime.** `runtime: nagoya(<flavor>)` or `runtime: tokio`.
- **`page_size` on a persisted table**, at any size above a 512-byte floor.
- **The default index backend is `arctic`**, not `worktables_index`. Arctic cannot
key an optional or variable-width column, so an index over `String optional`
must now say `using worktables_index`. Only `congee` still requires `persist`
to be stated explicitly.

## What you get

| | |
Expand Down
18 changes: 9 additions & 9 deletions benches/cases/full_featured.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn insert(c: &mut Criterion) {
another: format!("another_{}", fastrand::u64(..)),
something: fastrand::u64(..),
};
futures::executor::block_on(table.insert(black_box(row)))
nagoya::block_on(table.insert(black_box(row)))
},
BatchSize::SmallInput,
)
Expand All @@ -37,7 +37,7 @@ fn select_by_pk(c: &mut Criterion) {
another: format!("another_{}", fastrand::u64(..)),
something: fastrand::u64(..),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
})
.collect();

Expand All @@ -60,7 +60,7 @@ fn select_by_unique_index(c: &mut Criterion) {
another: format!("another_{}", i),
something: i,
};
futures::executor::block_on(table.insert(row)).unwrap();
nagoya::block_on(table.insert(row)).unwrap();
}

c.bench_function("full_featured_select_by_val1", |b| {
Expand All @@ -82,7 +82,7 @@ fn select_by_non_unique_index(c: &mut Criterion) {
another: format!("cat_{}", i % 10),
something: i,
};
futures::executor::block_on(table.insert(row)).unwrap();
nagoya::block_on(table.insert(row)).unwrap();
}

c.bench_function("full_featured_select_by_another", |b| {
Expand Down Expand Up @@ -196,7 +196,7 @@ fn in_place_update(c: &mut Criterion) {
another: "test".to_string(),
something: 0,
};
futures::executor::block_on(table.insert(row)).unwrap().into()
nagoya::block_on(table.insert(row)).unwrap().into()
};

c.bench_function("full_featured_in_place_update_val", |b| {
Expand All @@ -219,7 +219,7 @@ fn delete(c: &mut Criterion) {
another: format!("temp_{}", fastrand::u64(..)),
something: fastrand::u64(..),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
},
|pk: FullFeaturedPrimaryKey| rt.block_on(async { table.delete(black_box(pk)).await.unwrap() }),
BatchSize::SmallInput,
Expand All @@ -242,7 +242,7 @@ fn delete_by_index_query(c: &mut Criterion) {
another: another.clone(),
something: fastrand::u64(..),
};
futures::executor::block_on(table.insert(row)).unwrap();
nagoya::block_on(table.insert(row)).unwrap();
another
},
|another: String| rt.block_on(async { table.delete_by_another(another).await.unwrap() }),
Expand Down Expand Up @@ -319,7 +319,7 @@ fn batch_insert(c: &mut Criterion) {
another: format!("another_{}", i),
something: i as u64,
};
futures::executor::block_on(table.insert(black_box(row))).unwrap();
nagoya::block_on(table.insert(black_box(row))).unwrap();
}
black_box(table)
},
Expand Down Expand Up @@ -347,7 +347,7 @@ fn batch_select_pk(c: &mut Criterion) {
another: format!("another_{}", fastrand::u64(..)),
something: fastrand::u64(..),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
})
.collect();

Expand Down
10 changes: 5 additions & 5 deletions benches/cases/non_unique_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn select_by_pk(c: &mut Criterion) {
value: fastrand::u64(..),
category: fastrand::u64(0..10),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
})
.collect();

Expand All @@ -54,7 +54,7 @@ fn select_by_non_unique_index(c: &mut Criterion) {
value: fastrand::u64(..),
category: i % 10,
};
futures::executor::block_on(table.insert(row)).unwrap();
nagoya::block_on(table.insert(row)).unwrap();
}

c.bench_function("non_unique_index_select_by_category", |b| {
Expand Down Expand Up @@ -108,7 +108,7 @@ fn delete(c: &mut Criterion) {
value: fastrand::u64(..),
category: fastrand::u64(0..10),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
},
|pk: NonUniqueIndexPrimaryKey| rt.block_on(async { table.delete(black_box(pk)).await.unwrap() }),
BatchSize::SmallInput,
Expand Down Expand Up @@ -176,7 +176,7 @@ fn batch_insert(c: &mut Criterion) {
value: i as u64,
category: (i % 10) as u64,
};
futures::executor::block_on(table.insert(black_box(row))).unwrap();
nagoya::block_on(table.insert(black_box(row))).unwrap();
}
black_box(table)
},
Expand All @@ -202,7 +202,7 @@ fn batch_select_pk(c: &mut Criterion) {
value: fastrand::u64(..),
category: fastrand::u64(0..10),
};
futures::executor::block_on(table.insert(row)).unwrap()
nagoya::block_on(table.insert(row)).unwrap()
})
.collect();

Expand Down
Loading
Loading