/ Check-in [d279e1a3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add SQLITE_DBSTATUS_CACHE_HIT and _MISS to the ".stat" command in the shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d279e1a309909a0897b6082753a0fadb5066c31a
User & Date: drh 2011-09-23 18:58:23
Context
2011-09-24
05:55
Fix some test files so that they work with SQLITE_OMIT_WAL builds. check-in: a38668dc user: dan tags: trunk
2011-09-23
18:58
Add SQLITE_DBSTATUS_CACHE_HIT and _MISS to the ".stat" command in the shell. check-in: d279e1a3 user: drh tags: trunk
16:34
Add the -DBUILD_sqlite option to the compiler when building testfixture.exe using the configure script. check-in: 15a13b6c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

  1025   1025       fprintf(pArg->out, "Successful lookaside attempts:       %d\n", iHiwtr);
  1026   1026       sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur, &iHiwtr, bReset);
  1027   1027       fprintf(pArg->out, "Lookaside failures due to size:      %d\n", iHiwtr);
  1028   1028       sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur, &iHiwtr, bReset);
  1029   1029       fprintf(pArg->out, "Lookaside failures due to OOM:       %d\n", iHiwtr);
  1030   1030       iHiwtr = iCur = -1;
  1031   1031       sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_USED, &iCur, &iHiwtr, bReset);
  1032         -    fprintf(pArg->out, "Pager Heap Usage:                    %d bytes\n", iCur); 
         1032  +    fprintf(pArg->out, "Pager Heap Usage:                    %d bytes\n", iCur);    iHiwtr = iCur = -1;
         1033  +    sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_HIT, &iCur, &iHiwtr, 1);
         1034  +    fprintf(pArg->out, "Page cache hits:                     %d\n", iCur);
         1035  +    iHiwtr = iCur = -1;
         1036  +    sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_MISS, &iCur, &iHiwtr, 1);
         1037  +    fprintf(pArg->out, "Page cache misses:                   %d\n", iCur); 
  1033   1038       iHiwtr = iCur = -1;
  1034   1039       sqlite3_db_status(db, SQLITE_DBSTATUS_SCHEMA_USED, &iCur, &iHiwtr, bReset);
  1035   1040       fprintf(pArg->out, "Schema Heap Usage:                   %d bytes\n", iCur); 
  1036   1041       iHiwtr = iCur = -1;
  1037   1042       sqlite3_db_status(db, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHiwtr, bReset);
  1038   1043       fprintf(pArg->out, "Statement Heap/Lookaside Usage:      %d bytes\n", iCur); 
  1039   1044     }