]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a little extra variety to the tests in sort4.test.
authordan <dan@noemail.net>
Tue, 6 May 2014 16:21:30 +0000 (16:21 +0000)
committerdan <dan@noemail.net>
Tue, 6 May 2014 16:21:30 +0000 (16:21 +0000)
FossilOrigin-Name: 7de6aee6a5cb5c7f89dced89f2ebf38f8be7a4fa

manifest
manifest.uuid
test/sort4.test

index e5ca2b242a51a23f5555f59cb97b6548cce58439..e4b717ce1a8b52162209afd24f963adb2ec11d61 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Re-implement\sthe\score\sof\sthe\smulti-threaded\ssorter\stests\sin\ssort4.test\susing\sC.\sRun\seach\stest\sin\ssort4.test\sten\stimes,\sor\srepeat\sall\stests\sfor\s300\sseconds\sas\spart\sof\sthe\s"multithread"\spermutation\stest.
-D 2014-05-06T15:38:07.762
+C Add\sa\slittle\sextra\svariety\sto\sthe\stests\sin\ssort4.test.
+D 2014-05-06T16:21:30.441
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in ad0921c4b2780d01868cf69b419a4f102308d125
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -824,7 +824,7 @@ F test/softheap1.test 40562fe6cac6d9827b7b42b86d45aedf12c15e24
 F test/sort.test 688468cef8c9a66fcc1d54235de8e4deac745690
 F test/sort2.test c5e25eb674689e291d06b5209fe8d337ae0ec010
 F test/sort3.test 6178ade30810ac9166fcdf14b7065e49c0f534e2
-F test/sort4.test 5cce4601abc9b1b63ac25d087723b257710577bb
+F test/sort4.test 971452fd4e2928e6fc05c3868396ad7d5f9ce2ad
 F test/sortfault.test 1a12b6e27d475f50658a8164aaa34f0080a86b36
 F test/speed1.test f2974a91d79f58507ada01864c0e323093065452
 F test/speed1p.explain d841e650a04728b39e6740296b852dccdca9b2cb
@@ -1171,7 +1171,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 9cc364c42cc64ab7b55b5c55e303fb63a456cf00
-R 3ed4f872bc36ee2cfbd000cc3f4dde43
+P 208b2b04d4d282bec4424ea7160a123ba549d118
+R b3799ca8720be78abdc748ed84ab7526
 U dan
-Z 5684026d864e64d9d77cb71d6b4cd16b
+Z f689b9a36b0734ece63c5c5e094898f6
index 4e0ab1c048b05960a46f84eeb7620bf055703b59..0fc1ce1baf2f3bbdcfbd84ab03c86c9c176be180 100644 (file)
@@ -1 +1 @@
-208b2b04d4d282bec4424ea7160a123ba549d118
\ No newline at end of file
+7de6aee6a5cb5c7f89dced89f2ebf38f8be7a4fa
\ No newline at end of file
index 7bee0aad2790ea5a9c59646d5c05192b076b2f7f..4e8336cd84464b331053feb4cf0d22c090eb22e8 100644 (file)
@@ -127,6 +127,7 @@ proc sorter_test {nRow nRead nPayload} {
 #   -payload N       (bytes of payload to read with each row)
 #   -cachesize N     (Value for "PRAGMA cache_size = ?")
 #   -repeats N       (number of times to repeat test)
+#   -fakeheap BOOL   (true to use separate allocations for in-memory records)
 #
 proc do_sorter_test {tn args} {
   set a(-rows)      1000
@@ -134,6 +135,7 @@ proc do_sorter_test {tn args} {
   set a(-read)      100
   set a(-payload)   100
   set a(-cachesize) 100
+  set a(-fakeheap)  0
 
   foreach {s val} $args {
     if {[info exists a($s)]==0} { 
@@ -143,14 +145,20 @@ proc do_sorter_test {tn args} {
     }
     set a($s) $val
   }
+  if {[permutation] == "memsys3" || [permutation] == "memsys5"} {
+    set a(-fakeheap) 0
+  }
+  if {$a(-fakeheap)} { sorter_test_fakeheap 1 }
 
-  db eval "PRAGMA cache_size = $a(-cachesize)"
 
+  db eval "PRAGMA cache_size = $a(-cachesize)"
   do_test $tn [subst -nocommands {
     for {set i 0} {[set i] < $a(-repeats)} {incr i} {
       sorter_test $a(-rows) $a(-read) $a(-payload)
     }
   }] {}
+
+  if {$a(-fakeheap)} { sorter_test_fakeheap 0 }
 }
 
 proc clock_seconds {} {
@@ -168,12 +176,14 @@ do_test 1 {
 
 set iTimeLimit [expr [clock_seconds] + $SORT4TIMEOUT]
 
-for {set tn 2} {1} {incr tn} {
-  do_sorter_test $tn.2 -repeats 10 -rows 1000   -read 100
-  do_sorter_test $tn.3 -repeats 10 -rows 100000 -read 1000
-  do_sorter_test $tn.4 -repeats 10 -rows 100000 -read 1000 -payload 500
-  do_sorter_test $tn.5 -repeats 10 -rows 100000 -read 100000 -payload 8
-  do_sorter_test $tn.6 -repeats 10 -rows 100000 -read 10 -payload 8
+for {set t 2} {1} {incr tn} {
+  do_sorter_test $t.2 -repeats 10 -rows 1000   -read 100
+  do_sorter_test $t.3 -repeats 10 -rows 100000 -read 1000
+  do_sorter_test $t.4 -repeats 10 -rows 100000 -read 1000 -payload 500
+  do_sorter_test $t.5 -repeats 10 -rows 100000 -read 100000 -payload 8
+  do_sorter_test $t.6 -repeats 10 -rows 100000 -read 10 -payload 8
+  do_sorter_test $t.7 -repeats 10 -rows 10000 -read 10000 -payload 8 -fakeheap 1
+  do_sorter_test $t.8 -repeats 10 -rows 100000 -read 10000 -cachesize 250
 
   set iNow [clock_seconds]
   if {$iNow>=$iTimeLimit} break