Add the fts5speed.tcl script to ext/fts5/tool/.

FossilOrigin-Name: 2c0b93553ebb00a70c611eb8dac021877933f088
This commit is contained in:
dan 2016-01-11 18:23:07 +00:00
parent aaf17c41ec
commit 6a657b2477
3 changed files with 66 additions and 6 deletions

View File

@ -0,0 +1,59 @@
set Q {
{1 "SELECT count(*) FROM t1 WHERE t1 MATCH 'enron'"}
{25 "SELECT count(*) FROM t1 WHERE t1 MATCH 'hours'"}
{300 "SELECT count(*) FROM t1 WHERE t1 MATCH 'acid'"}
{100 "SELECT count(*) FROM t1 WHERE t1 MATCH 'loaned OR mobility OR popcore OR sunk'"}
{100 "SELECT count(*) FROM t1 WHERE t1 MATCH 'enron AND myapps'"}
{1 "SELECT count(*) FROM t1 WHERE t1 MATCH 'en* AND my*'"}
{1 "SELECT count(*) FROM t1 WHERE t1 MATCH 'c:t*'"}
{1 "SELECT count(*) FROM t1 WHERE t1 MATCH 'a:t* OR b:t* OR c:t* OR d:t* OR e:t* OR f:t* OR g:t*'"}
{1 "SELECT count(*) FROM t1 WHERE t1 MATCH 'a:t*'"}
}
proc usage {} {
global Q
puts stderr "Usage: $::argv0 DATABASE QUERY"
puts stderr ""
for {set i 1} {$i <= [llength $Q]} {incr i} {
puts stderr " $i. [lindex $Q [expr $i-1]]"
}
puts stderr ""
exit -1
}
set nArg [llength $argv]
if {$nArg!=2 && $nArg!=3} usage
set database [lindex $argv 0]
set iquery [lindex $argv 1]
if {$iquery<1 || $iquery>[llength $Q]} usage
set nRepeat 0
if {$nArg==3} { set nRepeat [lindex $argv 2] }
sqlite3 db $database
catch { load_static_extension db fts5 }
incr iquery -1
set sql [lindex $Q $iquery 1]
if {$nRepeat==0} {
set nRepeat [lindex $Q $iquery 0]
}
puts "sql: $sql"
puts "nRepeat: $nRepeat"
if {[regexp matchinfo $sql]} {
sqlite3_fts5_register_matchinfo db
db eval $sql
} else {
puts "result: [db eval $sql]"
}
for {set i 1} {$i < $nRepeat} {incr i} {
db eval $sql
}

View File

@ -1,5 +1,5 @@
C Fix\sbugs\sin\sfts5\ssynonym\sprocessing\sfor\sdetail=col\sand\sother\smodes.
D 2016-01-11T17:30:28.056
C Add\sthe\sfts5speed.tcl\sscript\sto\sext/fts5/tool/.
D 2016-01-11T18:23:07.397
F Makefile.in 7c8cc4c2f0179efc6fa9492141d1fb65f4807054
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc e45d8b9b56dfa3f2cd860b2c28bd9d304513b042
@ -181,6 +181,7 @@ F ext/fts5/test/fts5unicode3.test 35c3d02aa7acf7d43d8de3bfe32c15ba96e8928e
F ext/fts5/test/fts5unindexed.test e9539d5b78c677315e7ed8ea911d4fd25437c680
F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e
F ext/fts5/test/fts5vocab.test e4b12f238f113795615ba6343b63fb326d6a360e
F ext/fts5/tool/fts5speed.tcl aaee41894b552df8fbf8616aad003b2ea9ba3221
F ext/fts5/tool/fts5txt2db.tcl c374c4c4797e8cdfadabdfaeeb5412dcd6686e84
F ext/fts5/tool/loadfts5.tcl 4cc2d6af43b58d4fac05bc4fdabd0e5862c3b2c1
F ext/fts5/tool/mkfts5c.tcl d1c2a9ab8e0ec690a52316f33dd9b1d379942f45
@ -1410,7 +1411,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P b3e6f15ec2d9a834e2c80b91ffd7097553816228
R f239c4ba67c1753046748953bb2cde92
P 0e3c545423246231ddac8fed2f103d71d556e17f
R af2ae430a57fbc5161db0dbbd31b8a3f
U dan
Z 915aa1f2ec9df261dd260c37cdbace05
Z 7e47e5a1c7084b8fa203746692b6702a

View File

@ -1 +1 @@
0e3c545423246231ddac8fed2f103d71d556e17f
2c0b93553ebb00a70c611eb8dac021877933f088