1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Additional tests designed to detect future performance regressions. (CVS 3840)

FossilOrigin-Name: 764e7262b93a7a5073128ecd4db265b0c728a701
This commit is contained in:
drh
2007-04-13 03:23:21 +00:00
parent 538f570cd1
commit 6558db80c0
4 changed files with 73 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
C Fix\smultiple\sperformance\sregressions\s(ticket\s#2298\samong\sthem)\r\nand\sadd\stests\sto\smake\ssure\sthey\sdo\snot\scome\sback.\s(CVS\s3839)
D 2007-04-13T02:14:30
C Additional\stests\sdesigned\sto\sdetect\sfuture\sperformance\sregressions.\s(CVS\s3840)
D 2007-04-13T03:23:21
F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -289,7 +289,7 @@ F test/null.test 9503e1f63e959544c006d9f01709c5b5eab67d54
F test/pager.test 6c644725db2a79528f67a6f3472b9c9ddee17f05
F test/pager2.test c025f91b75fe65e85febda64d9416428b8a5cab5
F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
F test/pageropt.test 05d2a3cf1934bb215ecf084a93243a42fe0f8b94
F test/pageropt.test b4b38eb3cf76be2be444326856248898bb0e3fc9
F test/pagesize.test e0a8b3fe80f8b8e808d94a00734c7a18c76c407e
F test/pragma.test fecb7085f58d9fb5172a5c0b63fd3b25c7bfb414
F test/printf.test 483b9fe75ffae1fb27328bdce5560b452ba83577
@@ -324,7 +324,7 @@ F test/table.test feea6a3eb08cf166f570255eea5447e42ef82498
F test/tableapi.test 036575a98dcce7c92e9f39056839bbad8a715412
F test/tclsqlite.test 51334389283c74bcbe28645a73159b17e239e9f3
F test/temptable.test c36f3e5a94507abb64f7ba23deeb4e1a8a8c3821
F test/tester.tcl dda002daff1618f2ef0b451eff221581ca54afde
F test/tester.tcl 0fb5d0b93b05c41a1efcd3010fc6cf66f620a42e
F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35
F test/thread2.test 6d7b30102d600f51b4055ee3a5a19228799049fb
F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b
@@ -458,7 +458,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 0dd3e2e47b09156838edfa4dea0d82f9cf22d94d
R 2a770dc94eebbe8757f249788620bf30
P 32bb2d5859906b4fb0f6083eedd7f3a81b9cf5e2
R f21c4290ab1b521d34c9501951f30b4e
U drh
Z a0fae9ba10e5c203140db1181856fb83
Z 50dc4d00733590998717efbb4db67cac

View File

@@ -1 +1 @@
32bb2d5859906b4fb0f6083eedd7f3a81b9cf5e2
764e7262b93a7a5073128ecd4db265b0c728a701

View File

@@ -12,7 +12,7 @@
# The focus of the tests in this file are to verify that the
# pager optimizations implemented in version 3.3.14 work.
#
# $Id: pageropt.test,v 1.1 2007/04/13 02:14:30 drh Exp $
# $Id: pageropt.test,v 1.2 2007/04/13 03:23:21 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -134,5 +134,67 @@ do_test pageropt-2.3 {
}
} {0 4 3 0}
# Note the new optimization that when pulling the very last page off of the
# freelist we do not read the content of that page.
#
do_test pageropt-2.4 {
pagercount_sql {
INSERT INTO t1 VALUES(randomblob(1500));
}
} {0 5 3 0}
# Appending a large quantity of data does not involve writing much
# to the journal file.
#
do_test pageropt-3.1 {
pagercount_sql {
INSERT INTO t2 SELECT * FROM t1;
}
} {1 7 2 0}
# Once again, we do not need to read the last page of an overflow chain
# while deleting.
#
do_test pageropt-3.2 {
pagercount_sql {
DROP TABLE t2;
}
} {0 2 3 0}
do_test pageropt-3.3 {
pagercount_sql {
DELETE FROM t1;
}
} {0 3 3 0}
# There are now 11 pages on the freelist. Move them all into an
# overflow chain by inserting a single large record. Starting from
# a cold cache, only page 1, the root page of table t1, and the trunk
# of the freelist need to be read (3 pages). And only those three
# pages need to be journalled. But 13 pages need to be written:
# page1, the root page of table t1, and an 11 page overflow chain.
#
do_test pageropt-4.1 {
db close
sqlite3 db test.db
pagercount_sql {
INSERT INTO t1 VALUES(randomblob(11300))
}
} {3 13 3 0}
# Now we delete that big entries starting from a cold cache and an
# empty freelist. The first 10 of the 11 pages overflow chain have
# to be read, together with page1 and the root of the t1 table. 12
# reads total. But only page1, the t1 root, and the trunk of the
# freelist need to be journalled and written back.
#
do_test pageroot-4.2 {
db close
sqlite3 db test.db
pagercount_sql {
DELETE FROM t1
}
} {12 3 3 0}
catch {db2 close}
finish_test

View File

@@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.77 2007/03/31 22:34:16 drh Exp $
# $Id: tester.tcl,v 1.78 2007/04/13 03:23:21 drh Exp $
# Make sure tclsqlite3 was compiled correctly. Abort now with an
# error message if not.
@@ -119,6 +119,7 @@ proc do_test {name cmd expected} {
} else {
puts " Ok"
}
flush stdout
}
# Run an SQL script.