]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add to speedtest1.c the --threads option for setting the
authordrh <drh@noemail.net>
Fri, 18 Apr 2014 13:57:39 +0000 (13:57 +0000)
committerdrh <drh@noemail.net>
Fri, 18 Apr 2014 13:57:39 +0000 (13:57 +0000)
SQLITE_CONFIG_WORKER_THREADS configuration.

FossilOrigin-Name: 5fce40c44aacf883df2e8e9472c399a6e92197b3

manifest
manifest.uuid
test/speedtest1.c

index 58e22e923590f189ef165e0c402eedf206b345db..644d369a1a9ab53b564bb520d2ad5bef4e3835d4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarnings.
-D 2014-04-18T13:40:07.511
+C Add\sto\sspeedtest1.c\sthe\s--threads\soption\sfor\ssetting\sthe\nSQLITE_CONFIG_WORKER_THREADS\sconfiguration.
+D 2014-04-18T13:57:39.195
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in ad0921c4b2780d01868cf69b419a4f102308d125
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -829,7 +829,7 @@ F test/speed3.test d32043614c08c53eafdc80f33191d5bd9b920523
 F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715
 F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa
 F test/speed4p.test 0e51908951677de5a969b723e03a27a1c45db38b
-F test/speedtest1.c 90446861e566a9965a8d005381a3c964ff333646
+F test/speedtest1.c bd150a4c29e26ff4ddbdd505e0a0d96347ffca51
 F test/spellfix.test 61309f5efbec53603b3f86457d34a504f80abafe
 F test/sqllimits1.test b1aae27cc98eceb845e7f7adf918561256e31298
 F test/stat.test 76fd746b85459e812a0193410fb599f0531f22de
@@ -1164,7 +1164,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 8729aa3e3ed1da2e15408ef8705cbe185cd2a5ac
-R 1501533958e541baa710100e336c4bc8
+P f8f72ecb9052a4cace1db75879fb8b5131ea4f50
+R ec8b910c95550d011d611a610b4db207
 U drh
-Z 328a0fa311f69db138a2df8298545ace
+Z 39c3a2898ecaace6ee1641d24df0dd67
index 3ae7a2ee4ab1d6f035e1b551e66373d61677d633..f698cc6543ab343da0f88b0b4e8f8f3218abd126 100644 (file)
@@ -1 +1 @@
-f8f72ecb9052a4cace1db75879fb8b5131ea4f50
\ No newline at end of file
+5fce40c44aacf883df2e8e9472c399a6e92197b3
\ No newline at end of file
index 28c24e0885a1a45e05ececbd11b8034463b3d186..7d38b37b0daea2b740a816852bc94ccb130e6b06 100644 (file)
@@ -27,6 +27,7 @@ static const char zHelp[] =
   "  --stats             Show statistics at the end\n"
   "  --testset T         Run test-set T\n"
   "  --trace             Turn on SQL tracing\n"
+  "  --threads N         Use up to N threads for sorting\n"
   "  --utf16be           Set text encoding to UTF-16BE\n"
   "  --utf16le           Set text encoding to UTF-16LE\n"
   "  --without-rowid     Use WITHOUT ROWID where appropriate\n"
@@ -962,6 +963,7 @@ int main(int argc, char **argv){
   int nPCache = 0, szPCache = 0;/* --pcache configuration */
   int nScratch = 0, szScratch=0;/* --scratch configuration */
   int showStats = 0;            /* True for --stats */
+  int nThread = 0;              /* --threads value */
   const char *zTSet = "main";   /* Which --testset torun */
   int doTrace = 0;              /* True for --trace */
   const char *zEncoding = 0;    /* --utf16be or --utf16le */
@@ -1046,6 +1048,9 @@ int main(int argc, char **argv){
         zTSet = argv[++i];
       }else if( strcmp(z,"trace")==0 ){
         doTrace = 1;
+      }else if( strcmp(z,"threads")==0 ){
+        if( i>=argc-1 ) fatal_error("missing argument on %s\n", argv[i]);
+        nThread = integerValue(argv[++i]);
       }else if( strcmp(z,"utf16le")==0 ){
         zEncoding = "utf16le";
       }else if( strcmp(z,"utf16be")==0 ){
@@ -1092,6 +1097,11 @@ int main(int argc, char **argv){
     rc = sqlite3_config(SQLITE_CONFIG_SCRATCH, pScratch, szScratch, nScratch);
     if( rc ) fatal_error("scratch configuration failed: %d\n", rc);
   }
+#ifdef SQLITE_CONFIG_WORKER_THREADS
+  if( nThread>0 ){
+    sqlite3_config(SQLITE_CONFIG_WORKER_THREADS, nThread);
+  }
+#endif
   if( nLook>0 ){
     sqlite3_config(SQLITE_CONFIG_LOOKASIDE, 0, 0);
   }