make whopper run with checksums

pass `--enable-checksums` to either `run` or `explore` commands
This commit is contained in:
Avinash Sajjanshetty
2025-09-14 20:08:32 +05:30
parent 95660535da
commit d35789690e
4 changed files with 32 additions and 5 deletions

View File

@@ -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.

View File

@@ -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"]

View File

@@ -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

View File

@@ -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[@]}"