Documentation Source Text

Check-in [c31ae8096c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add lookaside change to the change log. Update testing stats. Other minor edits.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c31ae8096c5ab641913526abc3cd1528a7b8882e
User & Date: drh 2016-12-31 15:41:13
Context
2016-12-31
19:55
Remove the not-found.html document. check-in: 35ec903c39 user: drh tags: trunk
15:41
Add lookaside change to the change log. Update testing stats. Other minor edits. check-in: c31ae8096c user: drh tags: trunk
2016-12-30
16:41
Update the cpu performance stats for Ubuntu 16.04 and GCC 5.4.0. check-in: 0f60c6b4e4 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to misc/speed-size-graph.ods.

cannot compute difference between binary files

Changes to pages/changes.in.

24
25
26
27
28
29
30


31
32
33
34
35
36
37
chng {2017-00-00 (3.16.0)} {
<li>Uses 9% fewer CPU cycles. (See the [CPU performance measurement] report for
    details on how the this performance increase was computed.)
<li>Added experimental support for [PRAGMA functions].
<li>Added the [SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE] option to [sqlite3_db_config()].
<li>Enhance the [date and time functions] so that the 'unixepoch' modifier works
    for the full span of supported dates.


<li>Enhanced "WHERE x NOT NULL" [partial indexes] so that they are usable if 
    the "x" column appears in a LIKE or GLOB operator.
<li>Enhanced [sqlite3_interrupt()] so that it interrupts [checkpoint] operations that
    are in process.
<li>Enhanced the [LIKE] and [GLOB] matching algorithm to be faster
    for cases when the pattern contains multiple wildcards.
<li>Added [SQLITE_FCNTL_WIN32_GET_HANDLE] file control opcode.







>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
chng {2017-00-00 (3.16.0)} {
<li>Uses 9% fewer CPU cycles. (See the [CPU performance measurement] report for
    details on how the this performance increase was computed.)
<li>Added experimental support for [PRAGMA functions].
<li>Added the [SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE] option to [sqlite3_db_config()].
<li>Enhance the [date and time functions] so that the 'unixepoch' modifier works
    for the full span of supported dates.
<li>Changed the default configuration of the [lookaside memory allocator] from
    500 slots of 128 bytes each into 125 slots of 512 bytes each.
<li>Enhanced "WHERE x NOT NULL" [partial indexes] so that they are usable if 
    the "x" column appears in a LIKE or GLOB operator.
<li>Enhanced [sqlite3_interrupt()] so that it interrupts [checkpoint] operations that
    are in process.
<li>Enhanced the [LIKE] and [GLOB] matching algorithm to be faster
    for cases when the pattern contains multiple wildcards.
<li>Added [SQLITE_FCNTL_WIN32_GET_HANDLE] file control opcode.

Changes to pages/cpu.in.

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

<p>The use of the standardized speedtest1.c workload and cachegrind has
enabled significant performance improvement.
However, it is important to recognize the limitations of this approach:

<ul>
<li><p>
Performance measurements are done with a single compiler (gcc 4.8.4),
optimization setting (-Os), and
on a single platform (Ubuntu 14.04 LTS on x64).  The performance of
other compilers and processors may vary.

<li><p>
The speedtest1.c workload that is being measured tries to be representative
of a wide range of typical uses of SQLite.  But every application is
different.  The speedtest1.c workload might not be a good proxy for the
kinds of activities performed by some applications.  The SQLite developers







|

|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

<p>The use of the standardized speedtest1.c workload and cachegrind has
enabled significant performance improvement.
However, it is important to recognize the limitations of this approach:

<ul>
<li><p>
Performance measurements are done with a single compiler (gcc 5.4.0),
optimization setting (-Os), and
on a single platform (Ubuntu 16.04 LTS on x64).  The performance of
other compilers and processors may vary.

<li><p>
The speedtest1.c workload that is being measured tries to be representative
of a wide range of typical uses of SQLite.  But every application is
different.  The speedtest1.c workload might not be a good proxy for the
kinds of activities performed by some applications.  The SQLite developers

Changes to pages/testing.in.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# facilitate that, all the size values are defined by variables here
# which are then used as needed through the document.
#
# NOTE:  Also update the version number in the text!!!
#

# sloc sqlite3.c
set stat(coreSLOC)   116269  ;# Non-comment lines of amalgamation code 
# sloc test*.c
set stat(tclcSLOC)    24689  ;# Non-comment lines of test C code
# ls test*.c tclsqlite.c | wc
set stat(tclcNfile)      45  ;# Number of files of TCL C testcode + tclsqlite.c
# ls -l test*.c tclsqlite.c | awk '{sum+=$5}END{print sum}'
set stat(tclcNByte) 1155477  ;# Number of bytes of TCL C testcode + tclsqlite.c
# sloc `find . -name '*.test' -print` test/*.tcl
set stat(tclsSLOC)   303180  ;# Non-comment lines of TCL test script
# ls `find . -name '*.test' -print` test/*.tcl | wc
set stat(tclsNFile)    1038  ;# Number of files of TCL test script
# wc `find . -name '*.test' -print` test/*.tcl
set stat(tclsNByte) 13460858 ;# Number of bytes of TCL test script
# cat `find . -name '*.test' -print` | egrep 'do[_a-z]*_test' | wc
set stat(tclNTest)    37706  ;# Number of test cases in the TCL test suite
set stat(tclNEval)  2486283  ;# Number of test case evaluations (fulltest)
# grep fuzz device_one/test-out.txt | wc
set stat(nSqlFuzz)   105254  ;# Number of SQL fuzz tests
set stat(vqNEval)    135483  ;# Number of test evaluations for veryquick.test
#  set stat(vqStmtCov)   97.23  ;# veryquick statement coverage
#  set stat(vqBrCov)     92.57  ;# veryquick branch coverage
#  set stat(allStmtCov)  99.50  ;# all.test statement coverage
#  set stat(allBrCov)    97.41  ;# all.test condition/decision coverage
# tclsh mkth3.tcl cfg/*.cfg */*.test >th3.c; sloc th3.c
set stat(th3SLOC)    758530  ;# Non-comment lines in full th3.c
# ls -l th3.c
set stat(th3NByte) 55632737  ;# Number of bytes in full th3.c
# grep th3testCheck */*.test
# grep '^--result' */*.test
# grep '^--glob' */*.test
# grep '^--notglob' */*.test
set stat(th3NTest)      40100  ;# Number of test cases
# from output of a min.rc test run.
set stat(th3NECov)    1538037  ;# Number of test case evals for coverage
#set stat(th3NETest)  7247055  ;# Number of test case evaluations
#set stat(th3NEExt) 589175483  ;# Number of test case evals extended
#set stat(th3NERel) 2500000000 ;# Number of test case evals release
set stat(th3StmtCov) 100.00  ;# TH3 statement coverage
set stat(th3BrCov)   100.00  ;# TH3 branch coverage
# wc `find . -name '*.test'` | awk '{x+=$1}END{print x}'
set stat(sltsSLOC)  90489494 ;# Non-comment lines of SLT test script
................................................................................
# sloc md5.c slt_*.c sqllogictest.c
set stat(sltcSLOC)        1404 ;# Non-comment lines of SLT C code
# grep '^query' `fossil ls | awk '/\.test$/{print $2}'` | wc
set stat(sltNTest)     7195342 ;# Number of test cases in SLT
# grep 'errors out of' all-out.txt | awk '{x+=$5}END{print x}'
set stat(sltNRun)     11879758 ;# Number of tests run in SLT
# grep 'assert(' sqlite3.c | wc
set stat(nAssert)         4955 ;# Number of assert statements
# grep 'testcase(' sqlite3.c | grep -v define | wc
set stat(nTestcase)        823 ;# Number of testcase statements

set stat(totalSLOC) [expr {$stat(tclcSLOC)+$stat(tclsSLOC)+
                           $stat(th3SLOC)+$stat(sltcSLOC)+$stat(sltsSLOC)}]

proc GB {expr} {
  set n [uplevel #0 expr $expr]
  hd_puts [format %.2f [expr {$n/(1000.0*1000.0*1000.0)}]]
................................................................................
</tcl>

<h1>Introduction</h1>

<p>The reliability and robustness of SQLite is achieved in part
by thorough and careful testing.</p>

<p>As of [version 3.12.0] ([dateof:3.12.0]),
the SQLite library consists of approximately
<tcl>KB {$stat(coreSLOC)}</tcl> KSLOC of C code.
(KSLOC means thousands of "Source Lines Of Code" or, in other words,
lines of code excluding blank lines and comments.)
By comparison, the project has
<tcl>
hd_puts "[expr {int($stat(totalSLOC)/$stat(coreSLOC))}] times as much"







|

|

|

|

|

|

|

|









|

|




|

|







 







|

|







 







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# facilitate that, all the size values are defined by variables here
# which are then used as needed through the document.
#
# NOTE:  Also update the version number in the text!!!
#

# sloc sqlite3.c
set stat(coreSLOC)   122905  ;# Non-comment lines of amalgamation code 
# sloc test*.c
set stat(tclcSLOC)    25283  ;# Non-comment lines of test C code
# ls test*.c tclsqlite.c | wc
set stat(tclcNfile)      46  ;# Number of files of TCL C testcode + tclsqlite.c
# ls -l test*.c tclsqlite.c | awk '{sum+=$5}END{print sum}'
set stat(tclcNByte) 1191124  ;# Number of bytes of TCL C testcode + tclsqlite.c
# sloc `find . -name '*.test' -print` test/*.tcl
set stat(tclsSLOC)   306579  ;# Non-comment lines of TCL test script
# ls `find . -name '*.test' -print` test/*.tcl | wc
set stat(tclsNFile)    1080  ;# Number of files of TCL test script
# wc `find . -name '*.test' -print` test/*.tcl
set stat(tclsNByte) 13345897 ;# Number of bytes of TCL test script
# cat `find . -name '*.test' -print` | egrep 'do[_a-z]*_test' | wc
set stat(tclNTest)    39035  ;# Number of test cases in the TCL test suite
set stat(tclNEval)  2486283  ;# Number of test case evaluations (fulltest)
# grep fuzz device_one/test-out.txt | wc
set stat(nSqlFuzz)   105254  ;# Number of SQL fuzz tests
set stat(vqNEval)    135483  ;# Number of test evaluations for veryquick.test
#  set stat(vqStmtCov)   97.23  ;# veryquick statement coverage
#  set stat(vqBrCov)     92.57  ;# veryquick branch coverage
#  set stat(allStmtCov)  99.50  ;# all.test statement coverage
#  set stat(allBrCov)    97.41  ;# all.test condition/decision coverage
# tclsh mkth3.tcl cfg/*.cfg */*.test >th3.c; sloc th3.c
set stat(th3SLOC)    773290  ;# Non-comment lines in full th3.c
# ls -l th3.c
set stat(th3NByte) 56633680  ;# Number of bytes in full th3.c
# grep th3testCheck */*.test
# grep '^--result' */*.test
# grep '^--glob' */*.test
# grep '^--notglob' */*.test
set stat(th3NTest)      41661  ;# Number of test cases
# from output of a min.rc test run.
set stat(th3NECov)    1603083  ;# Number of test case evals for coverage
#set stat(th3NETest)  7247055  ;# Number of test case evaluations
#set stat(th3NEExt) 589175483  ;# Number of test case evals extended
#set stat(th3NERel) 2500000000 ;# Number of test case evals release
set stat(th3StmtCov) 100.00  ;# TH3 statement coverage
set stat(th3BrCov)   100.00  ;# TH3 branch coverage
# wc `find . -name '*.test'` | awk '{x+=$1}END{print x}'
set stat(sltsSLOC)  90489494 ;# Non-comment lines of SLT test script
................................................................................
# sloc md5.c slt_*.c sqllogictest.c
set stat(sltcSLOC)        1404 ;# Non-comment lines of SLT C code
# grep '^query' `fossil ls | awk '/\.test$/{print $2}'` | wc
set stat(sltNTest)     7195342 ;# Number of test cases in SLT
# grep 'errors out of' all-out.txt | awk '{x+=$5}END{print x}'
set stat(sltNRun)     11879758 ;# Number of tests run in SLT
# grep 'assert(' sqlite3.c | wc
set stat(nAssert)         5191 ;# Number of assert statements
# grep 'testcase(' sqlite3.c | grep -v define | wc
set stat(nTestcase)        844 ;# Number of testcase statements

set stat(totalSLOC) [expr {$stat(tclcSLOC)+$stat(tclsSLOC)+
                           $stat(th3SLOC)+$stat(sltcSLOC)+$stat(sltsSLOC)}]

proc GB {expr} {
  set n [uplevel #0 expr $expr]
  hd_puts [format %.2f [expr {$n/(1000.0*1000.0*1000.0)}]]
................................................................................
</tcl>

<h1>Introduction</h1>

<p>The reliability and robustness of SQLite is achieved in part
by thorough and careful testing.</p>

<p>As of [version 3.16.0] ([dateof:3.16.0]),
the SQLite library consists of approximately
<tcl>KB {$stat(coreSLOC)}</tcl> KSLOC of C code.
(KSLOC means thousands of "Source Lines Of Code" or, in other words,
lines of code excluding blank lines and comments.)
By comparison, the project has
<tcl>
hd_puts "[expr {int($stat(totalSLOC)/$stat(coreSLOC))}] times as much"