summaryrefslogtreecommitdiff
path: root/src/btree/bt_stat.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/btree/bt_stat.c
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'src/btree/bt_stat.c')
-rw-r--r--src/btree/bt_stat.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/btree/bt_stat.c b/src/btree/bt_stat.c
index 668c4fdb..04c0fbcb 100644
--- a/src/btree/bt_stat.c
+++ b/src/btree/bt_stat.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -278,6 +278,8 @@ __bam_stat_print(dbc, flags)
"%#x\tFixed-length record pad", (u_int)sp->bt_re_pad);
}
__db_dl(env,
+ "Number of pages in the database", (u_long)sp->bt_pagecnt);
+ __db_dl(env,
"Underlying database page size", (u_long)sp->bt_pagesize);
if (dbp->type == DB_BTREE)
__db_dl(env, "Overflow key/data size",
@@ -288,6 +290,10 @@ __bam_stat_print(dbc, flags)
"Number of records in the tree", (u_long)sp->bt_nkeys);
__db_dl(env,
"Number of data items in the tree", (u_long)sp->bt_ndata);
+ if (dbp->type == DB_BTREE) {
+ __db_dl(env,
+ "Number of blobs in the tree", (u_long)sp->bt_nblobs);
+ }
__db_dl(env,
"Number of tree internal pages", (u_long)sp->bt_int_pg);
@@ -372,6 +378,10 @@ __bam_stat_callback(dbc, h, cookie, putp)
/* Ignore off-page duplicates. */
if (B_TYPE(type) != B_DUPLICATE)
++sp->bt_ndata;
+
+ /* Count blobs. */
+ if (B_TYPE(type) == B_BLOB)
+ ++sp->bt_nblobs;
}
++sp->bt_leaf_pg;