sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
sqlite / test / time-wordcount.sh
| 1 | #!/bin/sh |
| 2 | # |
| 3 | # This script runs the wordcount program in different ways and generates |
| 4 | # an output useful for performance comparisons. |
| 5 | # |
| 6 | |
| 7 | # Select the source text to be analyzed. |
| 8 | # |
| 9 | if test "x$1" = "x"; |
| 10 | then echo "Usage: $0 FILENAME [ARGS...]"; exit 1; |
| 11 | fi |
| 12 | |
| 13 | # Do test runs |
| 14 | # |
| 15 | rm -f wcdb1.db |
| 16 | ./wordcount --tag A: --timer --summary wcdb1.db $* --insert |
| 17 | rm -f wcdb2.db |
| 18 | ./wordcount --tag B: --timer --summary wcdb2.db $* --insert --without-rowid |
| 19 | rm -f wcdb1.db |
| 20 | ./wordcount --tag C: --timer --summary wcdb1.db $* --replace |
| 21 | rm -f wcdb2.db |
| 22 | ./wordcount --tag D: --timer --summary wcdb2.db $* --replace --without-rowid |
| 23 | rm -f wcdb1.db |
| 24 | ./wordcount --tag E: --timer --summary wcdb1.db $* --select |
| 25 | rm -f wcdb2.db |
| 26 | ./wordcount --tag F: --timer --summary wcdb2.db $* --select --without-rowid |
| 27 | ./wordcount --tag G: --timer --summary wcdb1.db $* --query |
| 28 | ./wordcount --tag H: --timer --summary wcdb1.db $* --query --without-rowid |
| 29 | ./wordcount --tag I: --timer --summary wcdb1.db $* --delete |
| 30 | ./wordcount --tag J: --timer --summary wcdb2.db $* --delete --without-rowid |
| 31 | |
| 32 | # Clean up temporary files created. |
| 33 | # |
| 34 | rm -f wcdb1.db wcdb2.db |