3 # This script runs the wordcount program in different ways and generates
4 # an output useful for performance comparisons.
7 # Select the source text to be analyzed.
10 then echo "Usage: $0 FILENAME [ARGS...]"; exit 1;
16 .
/wordcount
--tag A
: --timer --summary wcdb1.db $
* --insert
18 .
/wordcount
--tag B
: --timer --summary wcdb2.db $
* --insert --without-rowid
20 .
/wordcount
--tag C
: --timer --summary wcdb1.db $
* --replace
22 .
/wordcount
--tag D
: --timer --summary wcdb2.db $
* --replace --without-rowid
24 .
/wordcount
--tag E
: --timer --summary wcdb1.db $
* --select
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
32 # Clean up temporary files created.
34 rm -f wcdb1.db wcdb2.db