aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-12-21 21:28:38 +0000
committerdrh <drh@noemail.net>2010-12-21 21:28:38 +0000
commit2a58e9cc32dad4e437ba880a951aa06bb69691e5 (patch)
treebf5191ffce1013d21124f25e88e2509434f954b0 /src/shell.c
parente0a55f443bdb7f90046ef4b87112a0231b868051 (diff)
downloadsqlite-2a58e9cc32dad4e437ba880a951aa06bb69691e5.tar.gz
sqlite-2a58e9cc32dad4e437ba880a951aa06bb69691e5.zip
Add test cases for the new lookaside hit and miss status outputs. Add
the output of lookaside hit and miss to the command-line shell statistics. FossilOrigin-Name: b0888047bb6d9ac55e29b9224df2ff650728bb78
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c
index 0609e4231..33dc1ac38 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -984,7 +984,7 @@ static int display_stats(
fprintf(pArg->out, "Memory Used: %d (max %d) bytes\n", iCur, iHiwtr);
iHiwtr = iCur = -1;
sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHiwtr, bReset);
- fprintf(pArg->out, "Number of Allocations: %d (max %d)\n", iCur, iHiwtr);
+ fprintf(pArg->out, "Number of Outstanding Allocations: %d (max %d)\n", iCur, iHiwtr);
/*
** Not currently used by the CLI.
** iHiwtr = iCur = -1;
@@ -1023,6 +1023,12 @@ static int display_stats(
iHiwtr = iCur = -1;
sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHiwtr, bReset);
fprintf(pArg->out, "Lookaside Slots Used: %d (max %d)\n", iCur, iHiwtr);
+ sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_HIT, &iCur, &iHiwtr, bReset);
+ fprintf(pArg->out, "Successful lookaside attempts: %d\n", iHiwtr);
+ sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur, &iHiwtr, bReset);
+ fprintf(pArg->out, "Lookaside failures due to size: %d\n", iHiwtr);
+ sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur, &iHiwtr, bReset);
+ fprintf(pArg->out, "Lookaside failures due to OOM: %d\n", iHiwtr);
iHiwtr = iCur = -1;
sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_USED, &iCur, &iHiwtr, bReset);
fprintf(pArg->out, "Pager Heap Usage: %d bytes\n", iCur);