System.Data.SQLite
Check-in [36cfd553e3]
Not logged in

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

Overview
Comment:Further enhancements to the SQLiteDataReader performance tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 36cfd553e30c9d453982a6a4f1d19cd221776fa6
User & Date: mistachkin 2014-07-18 23:35:12
Context
2014-07-19
00:14
Bump all versions to 1.0.94.0. check-in: f56f7104f7 user: mistachkin tags: trunk
2014-07-18
23:35
Further enhancements to the SQLiteDataReader performance tests. check-in: 36cfd553e3 user: mistachkin tags: trunk
22:42
Enhance the SQLiteDataReader performance test. check-in: 16705da626 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/speed.eagle.

16
17
18
19
20
21
22




23
24
25
26
27
28
29
..
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
...
137
138
139
140
141
142
143
144
145
146
147
148
149





150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167









168
169
170
171
172
###############################################################################

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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





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

................................................................................
              WHEN 1 THEN length(w) ELSE w END FROM t1;} \
      {SELECT CASE length(x) = 1048576
              WHEN 1 THEN length(x) ELSE x END 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 sql table column result 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}}}

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

runTest {test speed-1.2 {SQLiteDataReader speed testing} -setup {
................................................................................
  sql execute $db "INSERT INTO t4 (z) VALUES(X'0123456789');"
  sql execute $db "INSERT INTO t4 (z) VALUES(randomblob(1048576));"
} -body {
  set result [list]

  foreach {column table} [list w t1 x t2 y t3 z t4] {
    set sql [appendArgs "SELECT " $column " FROM " $table \;]

    tputs $test_channel [appendArgs \
        "---- executed query \"" $sql "\" in " [time {
          lappend result [llength [sql execute \
              -execute reader -format list $db $sql]]
        }] \n]





  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain sql table column result db fileName
} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {3 3 3 3}}

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

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










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

runSQLiteTestEpilogue
runTestEpilogue







>
>
>
>







 







|
|
|
|
|
>
>
>
>






|







 








|
<
|
|
|
>
>
>
>
>






|











>
>
>
>
>
>
>
>
>





16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
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
116
117
...
145
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
###############################################################################

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

set times [list]

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

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

................................................................................
              WHEN 1 THEN length(w) ELSE w END FROM t1;} \
      {SELECT CASE length(x) = 1048576
              WHEN 1 THEN length(x) ELSE x END 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;}] {
    set time [time {
      lappend result [sql execute -execute reader -format list $db $sql]
    }]

    tputs $test_channel [appendArgs \
        "---- executed query \"" [string map [list "\n              " " "] \
        $sql] "\" in " $time \n]

    lappend times [lindex $time 0]
  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain time sql result 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}}}

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

runTest {test speed-1.2 {SQLiteDataReader speed testing} -setup {
................................................................................
  sql execute $db "INSERT INTO t4 (z) VALUES(X'0123456789');"
  sql execute $db "INSERT INTO t4 (z) VALUES(randomblob(1048576));"
} -body {
  set result [list]

  foreach {column table} [list w t1 x t2 y t3 z t4] {
    set sql [appendArgs "SELECT " $column " FROM " $table \;]

    set time [time {

      lappend result [llength \
          [sql execute -execute reader -format list $db $sql]]
    }]

    tputs $test_channel [appendArgs \
        "---- executed query \"" $sql "\" in " $time \n]

    lappend times [lindex $time 0]
  }

  set result
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain time sql table column result db fileName
} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {3 3 3 3}}

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

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

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

tputs $test_channel [appendArgs \
    "---- overall performance results " $times \n]

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

unset -nocomplain times

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

runSQLiteTestEpilogue
runTestEpilogue