System.Data.SQLite
Check-in [d3be3b1abe]
Not logged in

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

Overview
Comment:Add initial performance tests for the SQLiteDataReader class.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d3be3b1abe77d968e839a3027f9147ddbf53fc1a
User & Date: mistachkin 2014-07-18 22:04:38
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
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to Setup/verify.lst.

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

Added Tests/speed.eagle.

            1  +###############################################################################
            2  +#
            3  +# speed.eagle --
            4  +#
            5  +# Written by Joe Mistachkin.
            6  +# Released to the public domain, use at your own risk!
            7  +#
            8  +###############################################################################
            9  +
           10  +package require Eagle
           11  +package require Eagle.Library
           12  +package require Eagle.Test
           13  +
           14  +runTestPrologue
           15  +
           16  +###############################################################################
           17  +
           18  +package require System.Data.SQLite.Test
           19  +runSQLiteTestPrologue
           20  +
           21  +###############################################################################
           22  +
           23  +#
           24  +# NOTE: Report before test, before shutdown.
           25  +#
           26  +checkForSQLiteDirectories $test_channel
           27  +getSQLiteHandleCounts $test_channel
           28  +reportSQLiteResources $test_channel
           29  +
           30  +###############################################################################
           31  +
           32  +#
           33  +# NOTE: Make sure that SQLite core library is completely shutdown prior to
           34  +#       starting any of the tests in this file.
           35  +#
           36  +shutdownSQLite $test_channel
           37  +
           38  +###############################################################################
           39  +
           40  +#
           41  +# NOTE: Report before test, after shutdown.
           42  +#
           43  +checkForSQLiteDirectories $test_channel
           44  +getSQLiteHandleCounts $test_channel
           45  +reportSQLiteResources $test_channel
           46  +
           47  +###############################################################################
           48  +
           49  +runTest {test speed-1.1 {SQLiteDataReader speed testing} -setup {
           50  +  setupDb [set fileName [appendArgs speed-1.1- [pid] .db]]
           51  +
           52  +  sql execute $db "CREATE TABLE t1(w INTEGER);"
           53  +  sql execute $db "CREATE TABLE t2(x REAL);"
           54  +  sql execute $db "CREATE TABLE t3(y TEXT);"
           55  +  sql execute $db "CREATE TABLE t4(z BLOB);"
           56  +
           57  +  sql execute $db "INSERT INTO t1 (w) VALUES(NULL);"
           58  +  sql execute $db "INSERT INTO t1 (w) VALUES(-9223372036854775808);"
           59  +  sql execute $db "INSERT INTO t1 (w) VALUES(0);"
           60  +  sql execute $db "INSERT INTO t1 (w) VALUES(9223372036854775807);"
           61  +
           62  +  sql execute $db "INSERT INTO t2 (x) VALUES(NULL);"
           63  +  sql execute $db "INSERT INTO t2 (x) VALUES(-1.7976931348623157e+308);"
           64  +  sql execute $db "INSERT INTO t2 (x) VALUES(0.0);"
           65  +  sql execute $db "INSERT INTO t2 (x) VALUES(1.7976931348623157e+308);"
           66  +
           67  +  sql execute $db "INSERT INTO t3 (y) VALUES(NULL);"
           68  +  sql execute $db "INSERT INTO t3 (y) VALUES('1');"
           69  +  sql execute $db "INSERT INTO t3 (y) VALUES('1.1');"
           70  +
           71  +  sql execute $db [appendArgs \
           72  +      "INSERT INTO t3 (y) VALUES('" [string repeat \
           73  +      [format %c [expr {int(rand() * 0x100)}]] 1048576] "');"]
           74  +
           75  +  sql execute $db "INSERT INTO t4 (z) VALUES(NULL);"
           76  +  sql execute $db "INSERT INTO t4 (z) VALUES(X'01');"
           77  +  sql execute $db "INSERT INTO t4 (z) VALUES(X'0123456789');"
           78  +  sql execute $db "INSERT INTO t4 (z) VALUES(randomblob(1048576));"
           79  +} -body {
           80  +  foreach sql [list \
           81  +      {SELECT w FROM t1;} \
           82  +      {SELECT x FROM t2;} \
           83  +      {SELECT CASE length(y) = 1048576
           84  +         WHEN 1 THEN length(y) ELSE y END FROM t3;} \
           85  +      {SELECT CASE length(z) = 1048576
           86  +         WHEN 1 THEN length(z) ELSE z END FROM t4;}] {
           87  +    tputs $test_channel [appendArgs \
           88  +        "---- executed query \"" \
           89  +        [string map [list "\n         " " "] $sql] "\" in " [time {
           90  +          lappend result [sql execute -execute reader -format list $db $sql]
           91  +        }] \n]
           92  +  }
           93  +
           94  +  set result
           95  +} -cleanup {
           96  +  cleanupDb $fileName
           97  +
           98  +  unset -nocomplain result sql db fileName
           99  +} -time true -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
          100  +System.Data.SQLite} -result {{-9223372036854775808 0 9223372036854775807}\
          101  +{-Infinity 0 Infinity} {1 1.1 1048576} {1 {1 35 69 103 137} 1048576}}}
          102  +
          103  +###############################################################################
          104  +
          105  +#
          106  +# NOTE: Report after test.
          107  +#
          108  +checkForSQLiteDirectories $test_channel
          109  +getSQLiteHandleCounts $test_channel
          110  +reportSQLiteResources $test_channel
          111  +
          112  +###############################################################################
          113  +
          114  +runSQLiteTestEpilogue
          115  +runTestEpilogue