mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Add batch-runner.js for running batch SQL scripts with timing info.
FossilOrigin-Name: 11f3ed61150c5940da6c157e5063e70c3aa0628dfd0023c47bb65b00af74ab1f
This commit is contained in:
11
ext/wasm/split-speedtest1-script.sh
Executable file
11
ext/wasm/split-speedtest1-script.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Expects $1 to be a (speedtest1 --script) output file. Output is a
|
||||
# series of SQL files extracted from that file.
|
||||
infile=${1:?arg = speedtest1 --script output file}
|
||||
testnums=$(grep -e '^-- begin test' "$infile" | cut -d' ' -f4)
|
||||
#echo testnums=$testnums
|
||||
for n in $testnums; do
|
||||
ofile=$(printf "speedtest1-%03d.sql" $n)
|
||||
sed -n -e "/^-- begin test $n\$/,/^-- end test $n\$/p" $infile > $ofile
|
||||
echo -e "$n\t$ofile"
|
||||
done
|
Reference in New Issue
Block a user