Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/sqlite/src/test/sort4.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/sort2.test ('k') | third_party/sqlite/src/test/sortfault.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2014 May 6. 1 # 2014 May 6.
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
11 # This file implements regression tests for SQLite library. 11 # This file implements regression tests for SQLite library.
12 # 12 #
13 # The tests in this file are brute force tests of the multi-threaded 13 # The tests in this file are brute force tests of the multi-threaded
14 # sorter. 14 # sorter.
15 # 15 #
16 16
17 set testdir [file dirname $argv0] 17 set testdir [file dirname $argv0]
18 source $testdir/tester.tcl 18 source $testdir/tester.tcl
19 set testprefix sort4 19 set testprefix sort4
20 db close
21 sqlite3_shutdown
22 sqlite3_config_pmasz 10
23 sqlite3_initialize
24 sqlite3 db test.db
25
20 26
21 # Configure the sorter to use 3 background threads. 27 # Configure the sorter to use 3 background threads.
22 db eval {PRAGMA threads=3} 28 #
29 # EVIDENCE-OF: R-19249-32353 SQLITE_LIMIT_WORKER_THREADS The maximum
30 # number of auxiliary worker threads that a single prepared statement
31 # may start.
32 #
33 do_test sort4-init001 {
34 db eval {PRAGMA threads=5}
35 sqlite3_limit db SQLITE_LIMIT_WORKER_THREADS -1
36 } {5}
37 do_test sort4-init002 {
38 sqlite3_limit db SQLITE_LIMIT_WORKER_THREADS 3
39 db eval {PRAGMA threads}
40 } {3}
41
23 42
24 # Minimum number of seconds to run for. If the value is 0, each test 43 # Minimum number of seconds to run for. If the value is 0, each test
25 # is run exactly once. Otherwise, tests are repeated until the timeout 44 # is run exactly once. Otherwise, tests are repeated until the timeout
26 # expires. 45 # expires.
27 set SORT4TIMEOUT 0 46 set SORT4TIMEOUT 0
28 if {[permutation] == "multithread"} { set SORT4TIMEOUT 300 } 47 if {[permutation] == "multithread"} { set SORT4TIMEOUT 300 }
29 48
30 #-------------------------------------------------------------------- 49 #--------------------------------------------------------------------
31 # Set up a table "t1" containing $nRow rows. Each row contains also 50 # Set up a table "t1" containing $nRow rows. Each row contains also
32 # contains blob fields that collectively contain at least $nPayload 51 # contains blob fields that collectively contain at least $nPayload
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 do_sorter_test $t.6 -repeats 10 -rows 100000 -read 10 -payload 8 199 do_sorter_test $t.6 -repeats 10 -rows 100000 -read 10 -payload 8
181 do_sorter_test $t.7 -repeats 10 -rows 10000 -read 10000 -payload 8 -fakeheap 1 200 do_sorter_test $t.7 -repeats 10 -rows 10000 -read 10000 -payload 8 -fakeheap 1
182 do_sorter_test $t.8 -repeats 10 -rows 100000 -read 10000 -cachesize 250 201 do_sorter_test $t.8 -repeats 10 -rows 100000 -read 10000 -cachesize 250
183 202
184 set iNow [clock_seconds] 203 set iNow [clock_seconds]
185 if {$iNow>=$iTimeLimit} break 204 if {$iNow>=$iTimeLimit} break
186 do_test "$testprefix-([expr $iTimeLimit-$iNow] seconds remain)" {} {} 205 do_test "$testprefix-([expr $iTimeLimit-$iNow] seconds remain)" {} {}
187 } 206 }
188 207
189 finish_test 208 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/sort2.test ('k') | third_party/sqlite/src/test/sortfault.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698