From: dan Date: Mon, 24 Jun 2024 15:05:28 +0000 (+0000) Subject: Enhance the output of ".scanstats vm" to include the absolute number of ticks for... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d02956cf81d2b87a272feed102941766d8bfaf7e;p=thirdparty%2Fsqlite.git Enhance the output of ".scanstats vm" to include the absolute number of ticks for each VM instruction, instead of just the percentage of the total. FossilOrigin-Name: d826236e22234bd0ab7888d26f2f2eeb8f109099c8936b62dedf6597df386e45 --- diff --git a/manifest b/manifest index 383c09036e..eb911dfe9a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\s11a4178f0e6cd760303a587,\sfrom\sthe\sbedrock\sbranch\sjust\safter\sthe\s3.45\srelease,\sinto\sthis\sbranch.\sThis\sis\sto\spick\sup\stest\scases\sonly. -D 2024-06-04T16:24:12.251 +C Enhance\sthe\soutput\sof\s".scanstats\svm"\sto\sinclude\sthe\sabsolute\snumber\sof\sticks\sfor\seach\sVM\sinstruction,\sinstead\sof\sjust\sthe\spercentage\sof\sthe\stotal. +D 2024-06-24T15:05:28.273 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -747,7 +747,7 @@ F src/random.c 9bd018738ec450bf35d28050b4b33fa9a6eebf3aaefb1a1cff42dc14a7725673 F src/resolve.c 446bcb8ebf0ea7066c2ca99e5336f0dbc9230ac76f80fafd1bfa82fe7871af2d F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c c581265a87628e1abcff72df3e96b56d89e8137ddb780d2522863cce08cf43cd -F src/shell.c.in f7cc8711aee604bc078a93d777ad7246980485c57fa3047408b0f842ba03c14d +F src/shell.c.in 5b255e2b7d08cdb7b0adeec11df12a09fcbc1e429f1291001dcf251b4b380fba F src/sqlite.h.in 882c85b1dbe2988af021a2fe60cd65a0c321f0a3f04ef762e0f3f07ebb53e040 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54 @@ -2197,8 +2197,9 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 885e01ae3547d83443fd656fa0b3aec5e6ced4836a8f9207cb9c1bf89431f11c 11a4178f0e6cd760303a5874b5a3529ccd78a2398b59700e878c7e6b1251de91 -R 525e421d7d2c9a2c13a472102d835b68 +P 66c885814e1c533f0f45ee01b6b25cd5ec08770d699e441b1af4f79b23e9f0a7 +Q +1535828335d2b0eccebae952ed2bc70cc0cd893bd4b079d26b80deff9b5f752b +R bcb9c4749d4d329d32c84510ae888dfd U dan -Z 9f3b4a7840c37a61b4229d213b43bb0b +Z 84abe36ce5967e2ec86fcaf29accb16f # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index fc447eb14a..d44863fad5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -66c885814e1c533f0f45ee01b6b25cd5ec08770d699e441b1af4f79b23e9f0a7 \ No newline at end of file +d826236e22234bd0ab7888d26f2f2eeb8f109099c8936b62dedf6597df386e45 diff --git a/src/shell.c.in b/src/shell.c.in index 8ee0dd2e72..cddd435178 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -2408,7 +2408,7 @@ static int shell_callback( case MODE_Explain: { static const int aExplainWidth[] = {4, 13, 4, 4, 4, 13, 2, 13}; static const int aExplainMap[] = {0, 1, 2, 3, 4, 5, 6, 7 }; - static const int aScanExpWidth[] = {4, 6, 6, 13, 4, 4, 4, 13, 2, 13}; + static const int aScanExpWidth[] = {4, 15, 6, 13, 4, 4, 4, 13, 2, 13}; static const int aScanExpMap[] = {0, 9, 8, 1, 2, 3, 4, 5, 6, 7 }; const int *aWidth = aExplainWidth; @@ -3418,7 +3418,13 @@ static void display_scanstats( if( pArg->scanstatsOn==3 ){ const char *zSql = " SELECT addr, opcode, p1, p2, p3, p4, p5, comment, nexec," - " round(ncycle*100.0 / (sum(ncycle) OVER ()), 2)||'%' AS cycles" + " format('% 6s (%.2f%%)'," + " CASE WHEN ncycle<100_000 THEN ncycle || ' '" + " WHEN ncycle<100_000_000 THEN (ncycle/1_000) || 'K'" + " WHEN ncycle<100_000_000_000 THEN (ncycle/1_000_000) || 'M'" + " ELSE (ncycle/1000_000_000) || 'G' END," + " ncycle*100.0/(sum(ncycle) OVER ())" + " ) AS cycles" " FROM bytecode(?)"; int rc = SQLITE_OK;