diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..733f220 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +on: + push: + branches: [ "master" ] + +name: build + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: build-binary + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features \ No newline at end of file diff --git a/enumerate-local.sh b/enumerate-local.sh new file mode 100755 index 0000000..cb37497 --- /dev/null +++ b/enumerate-local.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rm -r logs +mkdir logs +for m in 0 1 +do + for a in off fast strict + do + for w in t2 t3 t4 + do + cargo +nightly run -- -w $w -m $m -a $a -o logs/$w-$m-$a.log + done + done +done + +cargo +nightly run --bin log2csv -- -l \ No newline at end of file diff --git a/enumerate.sh b/enumerate.sh index 55d6702..1094d1c 100755 --- a/enumerate.sh +++ b/enumerate.sh @@ -8,7 +8,9 @@ do do for w in t2 t3 t4 do - cargo +nightly run -- -w $w -m $m -a $a -o logs/$w-$m-$a.log + ./corrupttest -w $w -m $m -a $a -o logs/$w-$m-$a.log -u $1 -s $2 done done -done \ No newline at end of file +done + +./log2csv \ No newline at end of file diff --git a/readme.md b/readme.md index 6189417..abf2f18 100644 --- a/readme.md +++ b/readme.md @@ -41,7 +41,9 @@ The result is written to both stderr and the log. ### How to test all -There is a [script](./enumerate.sh) to run all combinations of the flags, modify them when needed. +There is a [script](./enumerate.sh) to run all combinations of the flags, modify them when needed. + +It takes two arguments: the uri of TiDB and the status address of TiDB. There is also a binary tool to parse the logs (maybe we should take the benefit of slog to avoid parsing 🥲), and turn them into a csv.