System.Data.SQLite

Check-in [e3dee8b8fc]
Login

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

Overview
Comment:Set minimum wait time between workload iterations in the stress test.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e3dee8b8fc75f0faa91c094c94d5dee1cda89886
User & Date: mistachkin 2012-09-21 10:05:02.935
Context
2012-09-22
18:50
Modularize the connection opaque object handle lookup done by several tests. Modify test data-1.34 to use the Enum typed ReturnCode property instead of the Int32 typed ErrorCode property. Improve comments and formatting in the common test suite infrastructure file. check-in: 40e0fb8133 user: mistachkin tags: trunk
2012-09-21
10:05
Set minimum wait time between workload iterations in the stress test. check-in: e3dee8b8fc user: mistachkin tags: trunk
07:49
Enhancements to the stress test. Also, restore cleanup of log files in the design-time installer tests. check-in: 92cf80689a user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/stress.eagle.
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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test stress-1.1 {multithreaded stress testing} -setup {
  unset -nocomplain thread index workload srcDb db fileName compiled options \
      count

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

  proc expectedError { error } {
    return [expr {[regexp -- {\sno such table: t1\s} $error] || \
        [regexp -- {\sdatabase is locked\s} $error]}]
  }

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

  proc showTest { indicator } {
    tputs $::test_channel $indicator
    after [expr {int(rand() * 1000)}]
  }

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

  proc failTest { error } {
    set level [expr {[info level] - 1}]

    tputs $::test_channel [appendArgs \
        \n [info level $level] ": " $error \n]

    exit Failure; # halt all testing now.
  }

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

  set count(0) 1
  set count(1) 5


  if {[info exists argv] && [llength $argv] > 0} then {
    parse options -flags \
        {-StopOnUnknown +IgnoreOnUnknown SkipOnUnknown} -- [list \
        [list null MustHaveIntegerValue -1 -1 -count0 $count(0)] \
        [list null MustHaveIntegerValue -1 -1 -count1 $count(1)]] $argv


    set count(0) $options(-count0,value)
    set count(1) $options(-count1,value)

  }

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

  tputs $test_channel [appendArgs \
      "---- workloads will repeat " $count(0) " time(s)...\n"]

  tputs $test_channel [appendArgs \
      "---- workloads will have " $count(1) " iteration(s)...\n"]




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

  set compiled(12) ""
  set compiled(13) ""

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








|
|












|

















>





|
>



>










>
>
>







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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test stress-1.1 {multithreaded stress testing} -setup {
  unset -nocomplain result thread index workload srcDb db fileName compiled \
      options count

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

  proc expectedError { error } {
    return [expr {[regexp -- {\sno such table: t1\s} $error] || \
        [regexp -- {\sdatabase is locked\s} $error]}]
  }

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

  proc showTest { indicator } {
    tputs $::test_channel $indicator
    after [expr {int(rand() * 1000 + $::count(2))}]
  }

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

  proc failTest { error } {
    set level [expr {[info level] - 1}]

    tputs $::test_channel [appendArgs \
        \n [info level $level] ": " $error \n]

    exit Failure; # halt all testing now.
  }

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

  set count(0) 1
  set count(1) 5
  set count(2) 300

  if {[info exists argv] && [llength $argv] > 0} then {
    parse options -flags \
        {-StopOnUnknown +IgnoreOnUnknown SkipOnUnknown} -- [list \
        [list null MustHaveIntegerValue -1 -1 -count0 $count(0)] \
        [list null MustHaveIntegerValue -1 -1 -count1 $count(1)] \
        [list null MustHaveIntegerValue -1 -1 -count2 $count(2)]] $argv

    set count(0) $options(-count0,value)
    set count(1) $options(-count1,value)
    set count(2) $options(-count2,value)
  }

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

  tputs $test_channel [appendArgs \
      "---- workloads will repeat " $count(0) " time(s)...\n"]

  tputs $test_channel [appendArgs \
      "---- workloads will have " $count(1) " iteration(s)...\n"]

  tputs $test_channel [appendArgs \
      "---- workloads will wait at least " $count(2) " millisecond(s)...\n"]

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

  set compiled(12) ""
  set compiled(13) ""

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