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

Side by Side Diff: third_party/sqlite/sqlite-src-3100200/tool/run-speed-test.sh

Issue 2846743003: [sql] Remove SQLite 3.10.2 reference directory. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2 #
3 # This is a template for a script used for day-to-day size and
4 # performance monitoring of SQLite. Typical usage:
5 #
6 # sh run-speed-test.sh trunk # Baseline measurement of trunk
7 # sh run-speed-test.sh x1 # Measure some experimental change
8 # fossil test-diff --tk cout-trunk.txt cout-x1.txt # View chanages
9 #
10 # There are multiple output files, all with a base name given by
11 # the first argument:
12 #
13 # summary-$BASE.txt # Copy of standard output
14 # cout-$BASE.txt # cachegrind output
15 # explain-$BASE.txt # EXPLAIN listings
16 #
17 if test "$1" = ""
18 then
19 echo "Usage: $0 OUTPUTFILE [OPTIONS]"
20 exit
21 fi
22 NAME=$1
23 shift
24 CC_OPTS="-DSQLITE_ENABLE_RTREE"
25 SPEEDTEST_OPTS="--shrink-memory --reprepare"
26 SIZE=5
27 while test "$1" != ""; do
28 case $1 in
29 --reprepare)
30 SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
31 ;;
32 --autovacuum)
33 SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
34 ;;
35 --utf16be)
36 SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
37 ;;
38 --without-rowid)
39 SPEEDTEST_OPTS="$SPEEDTEST_OPTS $1"
40 ;;
41 --size)
42 shift; SIZE=$1
43 ;;
44 *)
45 CC_OPTS="$CC_OPTS $1"
46 ;;
47 esac
48 shift
49 done
50 SPEEDTEST_OPTS="$SPEEDTEST_OPTS --size $SIZE"
51 echo "NAME = $NAME" | tee summary-$NAME.txt
52 echo "SPEEDTEST_OPTS = $SPEEDTEST_OPTS" | tee -a summary-$NAME.txt
53 echo "CC_OPTS = $CC_OPTS" | tee -a summary-$NAME.txt
54 rm -f cachegrind.out.* speedtest1 speedtest1.db sqlite3.o
55 gcc -g -Os -Wall -I. $CC_OPTS -c sqlite3.c
56 size sqlite3.o | tee -a summary-$NAME.txt
57 gcc -g -Os -Wall -I. $CC_OPTS \
58 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
59 ./shell.c ./sqlite3.c -o sqlite3 -ldl -lpthread
60 SRC=./speedtest1.c
61 gcc -g -Os -Wall -I. $CC_OPTS $SRC ./sqlite3.o -o speedtest1 -ldl -lpthread
62 ls -l speedtest1 | tee -a summary-$NAME.txt
63 valgrind --tool=cachegrind ./speedtest1 speedtest1.db \
64 $SPEEDTEST_OPTS 2>&1 | tee -a summary-$NAME.txt
65 size sqlite3.o | tee -a summary-$NAME.txt
66 wc sqlite3.c
67 cg_anno.tcl cachegrind.out.* >cout-$NAME.txt
68 ./speedtest1 --explain $SPEEDTEST_OPTS | ./sqlite3 >explain-$NAME.txt
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3100200/tool/rollback-test.c ('k') | third_party/sqlite/sqlite-src-3100200/tool/showdb.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698