System.Data.SQLite

Check-in [d3be3b1abe]
Login

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

Overview
Comment:Add initial performance tests for the SQLiteDataReader class.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d3be3b1abe77d968e839a3027f9147ddbf53fc1a
User & Date: mistachkin 2014-07-18 22:04:38.605
Context
2014-07-18
22:42
Enhance the SQLiteDataReader performance test. check-in: 16705da626 user: mistachkin tags: trunk
22:04
Add initial performance tests for the SQLiteDataReader class. check-in: d3be3b1abe user: mistachkin tags: trunk
2014-07-02
17:45
Update a statement in the provider limitations documentation regarding deferred transaction locking semantics. Fix for [425f060dec]. check-in: 45cc5a21fa user: mistachkin tags: trunk
Changes
Unified Diff Show Whitespace Changes Patch
Changes to Setup/verify.lst.
627
628
629
630
631
632
633

634
635
636
637
638
639
640
  Tests/Installer_Test_Vs2005.log
  Tests/Installer_Test_Vs2008.log
  Tests/Installer_Test_Vs2010.log
  Tests/Installer_Test_Vs2012.log
  Tests/Installer_Test_Vs2013.log
  Tests/nonWal.db
  Tests/pkgIndex.eagle

  Tests/stress.eagle
  Tests/testlinq.out
  Tests/thread.eagle
  Tests/tkt-00f86f9739.eagle
  Tests/tkt-0d5b1ef362.eagle
  Tests/tkt-17045010df.eagle
  Tests/tkt-1c456ae75f.eagle







>







627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
  Tests/Installer_Test_Vs2005.log
  Tests/Installer_Test_Vs2008.log
  Tests/Installer_Test_Vs2010.log
  Tests/Installer_Test_Vs2012.log
  Tests/Installer_Test_Vs2013.log
  Tests/nonWal.db
  Tests/pkgIndex.eagle
  Tests/speed.eagle
  Tests/stress.eagle
  Tests/testlinq.out
  Tests/thread.eagle
  Tests/tkt-00f86f9739.eagle
  Tests/tkt-0d5b1ef362.eagle
  Tests/tkt-17045010df.eagle
  Tests/tkt-1c456ae75f.eagle
Added Tests/speed.eagle.






































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
###############################################################################
#
# speed.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

package require Eagle
package require Eagle.Library
package require Eagle.Test

runTestPrologue

###############################################################################

package require System.Data.SQLite.Test
runSQLiteTestPrologue

###############################################################################

#
# NOTE: Report before test, before shutdown.
#
checkForSQLiteDirectories $test_channel
getSQLiteHandleCounts $test_channel
reportSQLiteResources $test_channel

###############################################################################

#
# NOTE: Make sure that SQLite core library is completely shutdown prior to
#       starting any of the tests in this file.
#
shutdownSQLite $test_channel

###############################################################################

#
# NOTE: Report before test, after shutdown.
#
checkForSQLiteDirectories $test_channel
getSQLiteHandleCounts $test_channel
reportSQLiteResources $test_channel

###############################################################################

runTest {test speed-1.1 {SQLiteDataReader speed testing} -setup {
  setupDb [set fileName [appendArgs speed-1.1- [pid] .db]]

  sql execute $db "CREATE TABLE t1(w INTEGER);"
  sql execute $db "CREATE TABLE t2(x REAL);"
  sql execute $db "CREATE TABLE t3(y TEXT);"
  sql execute $db "CREATE TABLE t4(z BLOB);"

  sql execute $db "INSERT INTO t1 (w) VALUES(NULL);"
  sql execute $db "INSERT INTO t1 (w) VALUES(-9223372036854775808);"
  sql execute $db "INSERT INTO t1 (w) VALUES(0);"
  sql execute $db "INSERT INTO t1 (w) VALUES(9223372036854775807);"

  sql execute $db "INSERT INTO t2 (x) VALUES(NULL);"
  sql execute $db "INSERT INTO t2 (x) VALUES(-1.7976931348623157e+308);"
  sql execute $db "INSERT INTO t2 (x) VALUES(0.0);"
  sql execute $db "INSERT INTO t2 (x) VALUES(1.7976931348623157e+308);"

  sql execute $db "INSERT INTO t3 (y) VALUES(NULL);"
  sql execute $db "INSERT INTO t3 (y) VALUES('1');"
  sql execute $db "INSERT INTO t3 (y) VALUES('1.1');"

  sql execute $db [appendArgs \
      "INSERT INTO t3 (y) VALUES('" [string repeat \
      [format %c [expr {int(rand() * 0x100)}]] 1048576] "');"]

  sql execute $db "INSERT INTO t4 (z) VALUES(NULL);"
  sql execute $db "INSERT INTO t4 (z) VALUES(X'01');"
  sql execute $db "INSERT INTO t4 (z) VALUES(X'0123456789');"
  sql execute $db "INSERT INTO t4 (z) VALUES(randomblob(1048576));"
} -body {
  foreach sql [list \
      {SELECT w FROM t1;} \
      {SELECT x FROM t2;} \
      {SELECT CASE length(y) = 1048576
         WHEN 1 THEN length(y) ELSE y END FROM t3;} \
      {SELECT CASE length(z) = 1048576
         WHEN 1 THEN length(z) ELSE z END FROM t4;}] {
    tputs $test_channel [appendArgs \
        "---- executed query \"" \
        [string map [list "\n         " " "] $sql] "\" in " [time {
          lappend result [sql execute -execute reader -format list $db $sql]
        }] \n]
  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result sql db fileName
} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{-9223372036854775808 0 9223372036854775807}\
{-Infinity 0 Infinity} {1 1.1 1048576} {1 {1 35 69 103 137} 1048576}}}

###############################################################################

#
# NOTE: Report after test.
#
checkForSQLiteDirectories $test_channel
getSQLiteHandleCounts $test_channel
reportSQLiteResources $test_channel

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue