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

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

Overview
Comment:Add stress test workload to change the database journal mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0771490908bbad9a1d42b66777a57bc2efdcf3df
User & Date: mistachkin 2012-10-15 06:19:21
Context
2012-10-15
06:54
Allow trace logging to a file to be disabled in the stress test. Display and log values of test overrides specified on the command line. check-in: ecd7bb0722 user: mistachkin tags: trunk
06:19
Add stress test workload to change the database journal mode. check-in: 0771490908 user: mistachkin tags: trunk
05:07
In the stress test, always set thread names and allow the workload thread priorities to be overridden. check-in: 185b17b09d user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/stress.eagle.

922
923
924
925
926
927
928




























929
930
931
932
933
934
935
        }
      } finally {
        if {[info exists ptr]} then {freeMem $ptr}
        object invoke GC RemoveMemoryPressure $maxSize
      }
    }] 0]
  }]




























} -body {
  for {set index(0) 0} {$index(0) < $count(0)} {incr index(0)} {
    sql execute $db "CREATE TABLE IF NOT EXISTS t1(x PRIMARY KEY, y, z);"

    unset -nocomplain thread

    foreach index(1) [lsort -integer [array names workload]] {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
        }
      } finally {
        if {[info exists ptr]} then {freeMem $ptr}
        object invoke GC RemoveMemoryPressure $maxSize
      }
    }] 0]
  }]

  #############################################################################
  #                              WORKLOAD #17 (Q)                             #
  #############################################################################

  set workload(17) [list \
      [list srcFileName dstFileName table count1 count2 count3] {
    #
    # NOTE: Workload #17, change the database journal mode
    #
    lappend ::times(17) [lindex [time {
      setupDb $dstFileName "" "" "" "" "" true false
      for {set index 1} {$index <= $count1} {incr index} {
        if {[catch {
          set mode [expr {$index % 2 == 0 ? "delete" : "wal"}]
          sql execute $db [appendArgs "PRAGMA journal_mode = \"" $mode \"\;]
          showTest Q
        } error]} then {
          if {[isExpectedError $error]} then {
            showTest q
          } else {
            failTest q $error
          }
        }
      }
      cleanupDb $dstFileName db false true false
    }] 0]
  }]
} -body {
  for {set index(0) 0} {$index(0) < $count(0)} {incr index(0)} {
    sql execute $db "CREATE TABLE IF NOT EXISTS t1(x PRIMARY KEY, y, z);"

    unset -nocomplain thread

    foreach index(1) [lsort -integer [array names workload]] {