From 2e43e96107a9789ae67625c34a0b566fe3875384 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 3 Jul 2015 14:34:25 +0000 Subject: [PATCH] New command-line options for speedtest1: --multithread, --nomemstat, --serialized, and --singlethread FossilOrigin-Name: 2b7567229e3ba7e22271bb909ba977b3de19cca5 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/speedtest1.c | 12 ++++++++++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 391ee1d4fa..d282824079 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Copy\sfts5.h\sinto\sthe\sbuild\sdirectory\sas\spart\sof\sbuilding\sfts5.c.\sAlso\sremove\scode\sto\sedit\sfts5parse.c\sfrom\svarious\sMakefiles\sand\sadd\sit\sto\smkfts5c.tcl. -D 2015-07-02T20:12:34.556 +C New\scommand-line\soptions\sfor\sspeedtest1:\s--multithread,\s--nomemstat,\n--serialized,\sand\s--singlethread +D 2015-07-03T14:34:25.319 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 78db7e3b643002849258892ab2a9df10c24ee63d F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -1005,7 +1005,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 a2834483e435cf6017b0fead53c5a68c6efc67e8 +F test/speedtest1.c 2e8f367c5fe5e0c3df24a157e17cb2f75c1b88c7 F test/spellfix.test 0597065ff57042df1f138e6a2611ae19c2698135 F test/sqldiff1.test 8f6bc7c6a5b3585d350d779c6078869ba402f8f5 F test/sqllimits1.test e05786eaed7950ff6a2d00031d001d8a26131e68 @@ -1364,7 +1364,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P e53d497c2d2fbc5014b39f5624b52ce207800698 -R 1584f35d5dde8b2b947b977e6cc7cb5d -U dan -Z 1aebafb090eb6eb9b114980658da8eef +P 4d8f03dc7b6529cf8d46fc0fcc82112c0394dc13 +R fbb9a8281a2419b24b4e3dac11d68d49 +U drh +Z 5691cdc8be217e93d777dc94fd8a29f7 diff --git a/manifest.uuid b/manifest.uuid index 8adf4ef83c..937c76d6ea 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4d8f03dc7b6529cf8d46fc0fcc82112c0394dc13 \ No newline at end of file +2b7567229e3ba7e22271bb909ba977b3de19cca5 \ No newline at end of file diff --git a/test/speedtest1.c b/test/speedtest1.c index faa44c6c5a..caa2330bbd 100644 --- a/test/speedtest1.c +++ b/test/speedtest1.c @@ -15,6 +15,8 @@ static const char zHelp[] = " --journal M Set the journal_mode to M\n" " --key KEY Set the encryption key to KEY\n" " --lookaside N SZ Configure lookaside for N slots of SZ bytes each\n" + " --multithread Set multithreaded mode\n" + " --nomemstat Disable memory statistics\n" " --nosync Set PRAGMA synchronous=OFF\n" " --notnull Add NOT NULL constraints to table columns\n" " --pagesize N Set the page size to N\n" @@ -22,6 +24,8 @@ static const char zHelp[] = " --primarykey Use PRIMARY KEY instead of UNIQUE where appropriate\n" " --reprepare Reprepare each statement upon every invocation\n" " --scratch N SZ Configure scratch memory for N slots of SZ bytes each\n" + " --serialized Set serialized threading mode\n" + " --singlethread Set single-threaded mode - disables all mutexing\n" " --sqlonly No-op. Only show the SQL that would have been run.\n" " --shrink-memory Invoke sqlite3_db_release_memory() frequently.\n" " --size N Relative test size. Default=100\n" @@ -1227,6 +1231,10 @@ int main(int argc, char **argv){ nLook = integerValue(argv[i+1]); szLook = integerValue(argv[i+2]); i += 2; + }else if( strcmp(z,"multithread")==0 ){ + sqlite3_config(SQLITE_CONFIG_MULTITHREAD); + }else if( strcmp(z,"nomemstat")==0 ){ + sqlite3_config(SQLITE_CONFIG_MEMSTATUS, 0); }else if( strcmp(z,"nosync")==0 ){ noSync = 1; }else if( strcmp(z,"notnull")==0 ){ @@ -1253,6 +1261,10 @@ int main(int argc, char **argv){ nScratch = integerValue(argv[i+1]); szScratch = integerValue(argv[i+2]); i += 2; + }else if( strcmp(z,"serialized")==0 ){ + sqlite3_config(SQLITE_CONFIG_SERIALIZED); + }else if( strcmp(z,"singlethread")==0 ){ + sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); }else if( strcmp(z,"sqlonly")==0 ){ g.bSqlOnly = 1; }else if( strcmp(z,"shrink-memory")==0 ){ -- 2.47.2