Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/sqlite/src/tool/run-speed-test.sh

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/tool/replace.tcl ('k') | third_party/sqlite/src/tool/showdb.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/tool/run-speed-test.sh
diff --git a/third_party/sqlite/src/tool/run-speed-test.sh b/third_party/sqlite/src/tool/run-speed-test.sh
index ee2ceac660ec55e4287ae0dce4e3bfa89fe027b8..0e970ea0f6022ee17ee78982836d7955fdf54d25 100644
--- a/third_party/sqlite/src/tool/run-speed-test.sh
+++ b/third_party/sqlite/src/tool/run-speed-test.sh
@@ -12,7 +12,7 @@
#
# summary-$BASE.txt # Copy of standard output
# cout-$BASE.txt # cachegrind output
-# explain-$BASE.txt # EXPLAIN listings
+# explain-$BASE.txt # EXPLAIN listings (only with --explain)
#
if test "$1" = ""
then
@@ -21,9 +21,10 @@ then
fi
NAME=$1
shift
-CC_OPTS="-DSQLITE_ENABLE_RTREE"
-SPEEDTEST_OPTS="--shrink-memory --reprepare"
+CC_OPTS="-DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_MEMSYS5"
+SPEEDTEST_OPTS="--shrink-memory --reprepare --heap 10000000 64"
SIZE=5
+doExplain=0
while test "$1" != ""; do
case $1 in
--reprepare)
@@ -35,12 +36,29 @@ while test "$1" != ""; do
--utf16be)
SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
;;
+ --stats)
+ SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
+ ;;
--without-rowid)
SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
;;
+ --nomemstat)
+ SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
+ ;;
+ --wal)
+ SPEEDTEST_OPTS="$SPEEDTEST_OPTS --journal wal"
+ ;;
--size)
shift; SIZE=$1
;;
+ --explain)
+ doExplain=1
+ ;;
+ --heap)
+ CC_OPTS="$CC_OPTS -DSQLITE_ENABLE_MEMSYS5"
+ shift;
+ SPEEDTEST_OPTS="$SPEEDTEST_OPTS --heap $1 64"
+ ;;
*)
CC_OPTS="$CC_OPTS $1"
;;
@@ -54,9 +72,11 @@ echo "CC_OPTS = $CC_OPTS" | tee -a summary-$NAME.txt
rm -f cachegrind.out.* speedtest1 speedtest1.db sqlite3.o
gcc -g -Os -Wall -I. $CC_OPTS -c sqlite3.c
size sqlite3.o | tee -a summary-$NAME.txt
-gcc -g -Os -Wall -I. $CC_OPTS \
- -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
- ./shell.c ./sqlite3.c -o sqlite3 -ldl -lpthread
+if test $doExplain -eq 1; then
+ gcc -g -Os -Wall -I. $CC_OPTS \
+ -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
+ ./shell.c ./sqlite3.c -o sqlite3 -ldl -lpthread
+fi
SRC=./speedtest1.c
gcc -g -Os -Wall -I. $CC_OPTS $SRC ./sqlite3.o -o speedtest1 -ldl -lpthread
ls -l speedtest1 | tee -a summary-$NAME.txt
@@ -65,4 +85,6 @@ valgrind --tool=cachegrind ./speedtest1 speedtest1.db \
size sqlite3.o | tee -a summary-$NAME.txt
wc sqlite3.c
cg_anno.tcl cachegrind.out.* >cout-$NAME.txt
-./speedtest1 --explain $SPEEDTEST_OPTS | ./sqlite3 >explain-$NAME.txt
+if test $doExplain -eq 1; then
+ ./speedtest1 --explain $SPEEDTEST_OPTS | ./sqlite3 >explain-$NAME.txt
+fi
« no previous file with comments | « third_party/sqlite/src/tool/replace.tcl ('k') | third_party/sqlite/src/tool/showdb.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698