#!/bin/bash
#
# This is a template for a script used for day-to-day size and
# performance monitoring of SQLite. Typical usage:
#
# sh speed-check.sh trunk # Baseline measurement of trunk
# sh speed-check.sh x1 # Measure some experimental change
# fossil xdiff --tk cout-trunk.txt cout-x1.txt # View chanages
#
# There are multiple output files, all with a base name given by
# the first argument:
#
# summary-$BASE.txt # Copy of standard output
# cout-$BASE.txt # cachegrind output
# explain-$BASE.txt # EXPLAIN listings (only with --explain)
#
if
then
fi
NAME=
#CC_OPTS="-DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_MEMSYS5"
CC_OPTS="-DSQLITE_ENABLE_MEMSYS5"
CC=gcc
SPEEDTEST_OPTS="--shrink-memory --reprepare --stats --heap 10000000 64"
SIZE=5
LEAN_OPTS="-DSQLITE_THREADSAFE=0"
LEAN_OPTS=" -DSQLITE_DEFAULT_MEMSTATUS=0"
LEAN_OPTS=" -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1"
LEAN_OPTS=" -DSQLITE_LIKE_DOESNT_MATCH_BLOBS"
LEAN_OPTS=" -DSQLITE_MAX_EXPR_DEPTH=0"
LEAN_OPTS=" -DSQLITE_OMIT_DECLTYPE"
LEAN_OPTS=" -DSQLITE_OMIT_DEPRECATED"
LEAN_OPTS=" -DSQLITE_OMIT_PROGRESS_CALLBACK"
LEAN_OPTS=" -DSQLITE_OMIT_SHARED_CACHE"
LEAN_OPTS=" -DSQLITE_USE_ALLOCA"
BASELINE="trunk"
doExplain=0
doCachegrind=1
doVdbeProfile=0
doWal=1
doDiff=1
while ; do
case in
--nodiff)
doDiff=0
;;
--reprepare)
SPEEDTEST_OPTS=" "
;;
--autovacuum)
SPEEDTEST_OPTS=" "
;;
--utf16be)
SPEEDTEST_OPTS=" "
;;
--stats)
SPEEDTEST_OPTS=" "
;;
--without-rowid)
SPEEDTEST_OPTS=" "
;;
--strict)
SPEEDTEST_OPTS=" "
;;
--nomemstat)
SPEEDTEST_OPTS=" "
;;
--multithread)
SPEEDTEST_OPTS=" "
;;
--singlethread)
SPEEDTEST_OPTS=" "
;;
--serialized)
SPEEDTEST_OPTS=" "
;;
--temp)
SPEEDTEST_OPTS=" --temp 6"
;;
--legacy)
doWal=0
CC_OPTS=" -DSPEEDTEST_OMIT_HASH"
;;
--verify)
SPEEDTEST_OPTS=" --verify"
;;
--wal)
doWal=1
;;
--size)
; SIZE=
;;
--cachesize)
; SPEEDTEST_OPTS=" --cachesize "
;;
--stmtcache)
; SPEEDTEST_OPTS=" --stmtcache "
;;
--checkpoint)
SPEEDTEST_OPTS=" --checkpoint"
;;
--explain)
doExplain=1
;;
--vdbeprofile)
CC_OPTS=" -DVDBE_PROFILE"
doCachegrind=0
doVdbeProfile=1
;;
--lean)
CC_OPTS=" "
;;
--clang)
CC=clang
;;
--icc)
CC=/home/drh/intel/bin/icc
;;
--gcc7)
CC=gcc-7
;;
--heap)
CC_OPTS=" -DSQLITE_ENABLE_MEMSYS5"
;
SPEEDTEST_OPTS=" --heap 64"
;;
--lookaside)
;
SPEEDTEST_OPTS=" --lookaside "
;
;;
--repeat)
CC_OPTS=" -DSQLITE_ENABLE_RCACHE"
;
SPEEDTEST_OPTS=" --repeat "
;;
--mmap)
;
SPEEDTEST_OPTS=" --mmap "
;;
--rtree)
SPEEDTEST_OPTS=" --testset rtree"
CC_OPTS=" -DSQLITE_ENABLE_RTREE"
;;
--persist)
SPEEDTEST_OPTS=" --persist"
;;
--orm)
SPEEDTEST_OPTS=" --testset orm"
;;
--cte)
SPEEDTEST_OPTS=" --testset cte"
;;
--fp)
SPEEDTEST_OPTS=" --testset fp"
;;
--stmtscanstatus)
SPEEDTEST_OPTS=" --stmtscanstatus"
;;
-*)
CC_OPTS=" "
;;
*)
BASELINE=
;;
esac
done
if ; then
SPEEDTEST_OPTS=" --journal wal"
fi
SPEEDTEST_OPTS=" --size "
|
|
|
if ; then
fi
|
if ; then
fi
SRC=./speedtest1.c
|
if ; then
|
else
|
fi
|
if ; then
fi
if ; then
|
fi
if ; then
fi
if ; then
fi