mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-31 13:54:27 +01:00
make whopper run with checksums
pass `--enable-checksums` to either `run` or `explore` commands
This commit is contained in:
@@ -248,6 +248,8 @@ Note that exploration uses the `chaos` mode so if you need to reproduce a run, u
|
||||
SEED=1234 ./whopper/bin/run --mode chaos
|
||||
```
|
||||
|
||||
Both `explore` and `run` accept `--enable-checksums` flag to enable per page checksums.
|
||||
|
||||
## Python Bindings
|
||||
|
||||
Turso provides Python bindings built on top of the [PyO3](https://pyo3.rs) project.
|
||||
|
||||
@@ -25,3 +25,6 @@ tracing = { workspace = true }
|
||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
|
||||
turso_core = { path = "../core", features = ["simulator"]}
|
||||
turso_parser = { workspace = true }
|
||||
|
||||
[features]
|
||||
checksum = ["turso_core/checksum"]
|
||||
@@ -2,9 +2,20 @@
|
||||
|
||||
set -e
|
||||
|
||||
cargo build -p turso_whopper
|
||||
# Check for special build time flags (e.g. `--enable-checksums`)
|
||||
FEATURES=""
|
||||
ARGS=()
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "--enable-checksums" ]]; then
|
||||
FEATURES="--features checksum"
|
||||
else
|
||||
ARGS+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
cargo build $FEATURES -p turso_whopper
|
||||
|
||||
echo "Running Whopper in an infinite loop in 'chaos' mode..."
|
||||
while true; do
|
||||
time RUST_BACKTRACE=full ./target/debug/turso_whopper --mode chaos
|
||||
done
|
||||
time RUST_BACKTRACE=full ./target/debug/turso_whopper --mode chaos "${ARGS[@]}"
|
||||
done
|
||||
@@ -2,6 +2,17 @@
|
||||
|
||||
set -e
|
||||
|
||||
cargo build -p turso_whopper
|
||||
# Check for special build time flags (e.g. `--enable-checksums`)
|
||||
FEATURES=""
|
||||
ARGS=()
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "--enable-checksums" ]]; then
|
||||
FEATURES="--features checksum"
|
||||
else
|
||||
ARGS+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
time RUST_BACKTRACE=full ./target/debug/turso_whopper $*
|
||||
cargo build $FEATURES -p turso_whopper
|
||||
|
||||
time RUST_BACKTRACE=full ./target/debug/turso_whopper "${ARGS[@]}"
|
||||
Reference in New Issue
Block a user