diff options
author | stephan <stephan@noemail.net> | 2022-08-29 12:39:34 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-08-29 12:39:34 +0000 |
commit | 2cae138fbae5404fc8fc5319ba52abdb0d723c0c (patch) | |
tree | b206bf98e518d0400819c81693539a16734c1486 /ext/wasm/split-speedtest1-script.sh | |
parent | f2e624ea918d6509165a07205d08acd7ffe77927 (diff) | |
download | sqlite-2cae138fbae5404fc8fc5319ba52abdb0d723c0c.tar.gz sqlite-2cae138fbae5404fc8fc5319ba52abdb0d723c0c.zip |
Add batch-runner.js for running batch SQL scripts with timing info.
FossilOrigin-Name: 11f3ed61150c5940da6c157e5063e70c3aa0628dfd0023c47bb65b00af74ab1f
Diffstat (limited to 'ext/wasm/split-speedtest1-script.sh')
-rwxr-xr-x | ext/wasm/split-speedtest1-script.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/wasm/split-speedtest1-script.sh b/ext/wasm/split-speedtest1-script.sh new file mode 100755 index 000000000..c7dae3eb6 --- /dev/null +++ b/ext/wasm/split-speedtest1-script.sh @@ -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 |