diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-09-04 16:37:41 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-09-04 16:37:41 (GMT) |
commit | d1e7ac416e81d70c98a36f7ab265bf58e2a224c4 (patch) | |
tree | f9a002285bd1ce3e647cdd0eaf2960207160a364 /src/H5B2stat.c | |
parent | 35a3022373a424e99db29a84063d0511ffcefac9 (diff) | |
download | hdf5-d1e7ac416e81d70c98a36f7ab265bf58e2a224c4.zip hdf5-d1e7ac416e81d70c98a36f7ab265bf58e2a224c4.tar.gz hdf5-d1e7ac416e81d70c98a36f7ab265bf58e2a224c4.tar.bz2 |
[svn-r12638] Description:
Split edge nodes in the tree with a 1->2 node split, instead of a 2->3 node
split, which creates a more dense tree when a pattern of record insertions
occurs (because it leaves behind full nodes instead of 2/3 full nodes).
Tested:
FreeBSD/32 4.11 (sleipnir)
Linux/64 2.4 (mir)
Linux/32 2.4 (heping)
Solaris/64 2.9 (shanti)
Diffstat (limited to 'src/H5B2stat.c')
-rw-r--r-- | src/H5B2stat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/H5B2stat.c b/src/H5B2stat.c index b00df55..1251195 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -86,6 +86,7 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr, H5B2_stat_t *info) { H5B2_t *bt2 = NULL; /* Pointer to the B-tree header */ + H5B2_shared_t *shared; /* Pointer to B-tree's shared information */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5B2_stat_info) @@ -100,8 +101,15 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header") -/* XXX: Fill in metadata statistics for the heap */ - info = info; /* Quiet compiler for now) */ + /* Get pointer to reference counted shared B-tree info */ + shared = H5RC_GET_OBJ(bt2->shared); + + /* Get information about the B-tree */ + info->depth = bt2->depth; + info->nrecords = bt2->root.all_nrec; + info->branch_nrec = shared->branch_nrec; + info->twig_nrec = shared->twig_nrec; + info->leaf_nrec = shared->leaf_nrec; done: /* Release B-tree header node */ |