From: stephan Date: Mon, 29 Aug 2022 09:51:17 +0000 (+0000) Subject: Add begin/end comment markers to the test blocks in speedtest1 --script output to... X-Git-Tag: version-3.40.0~169^2~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a2efd8e1f488c3c00295bc7490e3b40ebc192c4;p=thirdparty%2Fsqlite.git Add begin/end comment markers to the test blocks in speedtest1 --script output to facilitate chopping up the output into chunks for JS-side processing. FossilOrigin-Name: ef0b7ef2d2e19b1f9437fdd7e24f040f662d9907d1fa17c6a3892fcf091b849e --- diff --git a/manifest b/manifest index 532fe66a0e..1c823620f6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C oo\s#1\sapi:\scorrect\sa\scase\swhere\sa\snull\scallback\sis\scalled.\sRename\ssome\svars\sfor\sclarity.\sIncrease\swasm-side\smemory\sin\sorder\sto\sbe\sable\sto\sload\sthe\sspeedtest1\soutput. -D 2022-08-29T08:04:55.473 +C Add\sbegin/end\scomment\smarkers\sto\sthe\stest\sblocks\sin\sspeedtest1\s--script\soutput\sto\sfacilitate\schopping\sup\sthe\soutput\sinto\schunks\sfor\sJS-side\sprocessing. +D 2022-08-29T09:51:17.953 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1490,7 +1490,7 @@ F test/speed3.test 694affeb9100526007436334cf7d08f3d74b85ef F test/speed4.test abc0ad3399dcf9703abed2fff8705e4f8e416715 F test/speed4p.explain 6b5f104ebeb34a038b2f714150f51d01143e59aa F test/speed4p.test 377a0c48e5a92e0b11c1c5ebb1bc9d83a7312c922bc0cb05970ef5d6a96d1f0c -F test/speedtest1.c 8bf7ebac9ac316feed6656951249db531dc380c73fb3e3b22e224ffda96beff6 +F test/speedtest1.c ad03c49d993b6fd4e8e6ad1df561edd1c17ec85226edd2137c355e404a0f985d F test/spellfix.test 951a6405d49d1a23d6b78027d3877b4a33eeb8221dcab5704b499755bb4f552e F test/spellfix2.test dfc8f519a3fc204cb2dfa8b4f29821ae90f6f8c3 F test/spellfix3.test 0f9efaaa502a0e0a09848028518a6fb096c8ad33 @@ -2009,8 +2009,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 34279797be0922b9df05e0d4f327f8582ab25fb6fb21583f8441ddf5deded891 -R 33c519177a8614fb691ab50256f2cf44 +P b5058f14fadbc8a1886f27cff08593dd2c8e2b2cb6d7bed3b8733a55f031989f +R 36f1b21cb1d4644e92fb6c673b070ffc U stephan -Z d1dd6a72031bb9355624c4c89a613214 +Z 7df3fe59906fdbadae6efee36992f3be # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 6044ded307..aef69a98ac 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b5058f14fadbc8a1886f27cff08593dd2c8e2b2cb6d7bed3b8733a55f031989f \ No newline at end of file +ef0b7ef2d2e19b1f9437fdd7e24f040f662d9907d1fa17c6a3892fcf091b849e \ No newline at end of file diff --git a/test/speedtest1.c b/test/speedtest1.c index b115a57e2b..7f0e3d34a9 100644 --- a/test/speedtest1.c +++ b/test/speedtest1.c @@ -372,10 +372,12 @@ int speedtest1_numbername(unsigned int n, char *zOut, int nOut){ #define NAMEWIDTH 60 static const char zDots[] = "......................................................................."; +static int iTestNumber = 0; /* Current test # for begin/end_test(). */ void speedtest1_begin_test(int iTestNum, const char *zTestName, ...){ int n = (int)strlen(zTestName); char *zName; va_list ap; + iTestNumber = iTestNum; va_start(ap, zTestName); zName = sqlite3_vmprintf(zTestName, ap); va_end(ap); @@ -384,6 +386,9 @@ void speedtest1_begin_test(int iTestNum, const char *zTestName, ...){ zName[NAMEWIDTH] = 0; n = NAMEWIDTH; } + if( g.pScript ){ + fprintf(g.pScript,"-- begin test %d\n", iTestNumber); + } if( g.bSqlOnly ){ printf("/* %4d - %s%.*s */\n", iTestNum, zName, NAMEWIDTH-n, zDots); }else{ @@ -404,6 +409,10 @@ void speedtest1_exec(const char*,...); void speedtest1_end_test(void){ sqlite3_int64 iElapseTime = speedtest1_timestamp() - g.iStart; if( g.doCheckpoint ) speedtest1_exec("PRAGMA wal_checkpoint;"); + assert( iTestNumber > 0 ); + if( g.pScript ){ + fprintf(g.pScript,"-- end test %d\n", iTestNumber); + } if( !g.bSqlOnly ){ g.iTotal += iElapseTime; printf("%4d.%03ds\n", (int)(iElapseTime/1000), (int)(iElapseTime%1000)); @@ -412,6 +421,7 @@ void speedtest1_end_test(void){ sqlite3_finalize(g.pStmt); g.pStmt = 0; } + iTestNumber = 0; } /* Report end of testing */