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/kvtest-speed.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/fuzzershell.c ('k') | third_party/sqlite/src/tool/lemon.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/tool/kvtest-speed.sh
diff --git a/third_party/sqlite/src/tool/kvtest-speed.sh b/third_party/sqlite/src/tool/kvtest-speed.sh
new file mode 100644
index 0000000000000000000000000000000000000000..5f2c8345bee5caf152649a6fa04cd128ea4cd9ff
--- /dev/null
+++ b/third_party/sqlite/src/tool/kvtest-speed.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# A script for running speed tests using kvtest.
+#
+# The test database must be set up first. Recommended
+# command-line:
+#
+# ./kvtest init kvtest.db --count 100K --size 12K --variance 5K
+
+if test "$1" = ""
+then
+ echo "Usage: $0 OUTPUTFILE [OPTIONS]"
+ exit
+fi
+NAME=$1
+shift
+OPTS="-DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DIRECT_OVERFLOW_READ -DUSE_PREAD"
+KVARGS="--count 100K --stats"
+gcc -g -Os -I. $OPTS $* kvtest.c sqlite3.c -o kvtest
+
+# First run using SQL
+rm cachegrind.out.[1-9][0-9]*
+valgrind --tool=cachegrind ./kvtest run kvtest.db $KVARGS 2>&1 | tee summary-kvtest-$NAME.txt
+mv cachegrind.out.[1-9][0-9]* cachegrind.out.sql-$NAME
+cg_anno.tcl cachegrind.out.sql-$NAME >cout-kvtest-sql-$NAME.txt
+
+# Second run using the sqlite3_blob object
+valgrind --tool=cachegrind ./kvtest run kvtest.db $KVARGS --blob-api 2>&1 | tee -a summary-kvtest-$NAME.txt
+mv cachegrind.out.[1-9][0-9]* cachegrind.out.$NAME
+cg_anno.tcl cachegrind.out.$NAME >cout-kvtest-$NAME.txt
+
+# Diff the sqlite3_blob API analysis for non-trunk runs.
+if test "$NAME" != "trunk"; then
+ fossil test-diff --tk cout-kvtest-trunk.txt cout-kvtest-$NAME.txt &
+fi
« no previous file with comments | « third_party/sqlite/src/tool/fuzzershell.c ('k') | third_party/sqlite/src/tool/lemon.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698