git: sbin/hammer: Make hammer show support zone statistics
tkusumi at crater.dragonflybsd.org
Fri Jul 24 14:52:31 PDT 2015
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Fri Jul 24 05:35:50 2015 +0900
sbin/hammer: Make hammer show support zone statistics
- Update zone statistics while iterating btree and
print them after btree-walk is done.
- The zone statistics is enabled when -v is specified just
like hammer checkmap.
- hammer show's statistics use elm->leaf.data_len for used
bytes, so it could have different number from blockmap/
checkmap statistics (blockmap/checkmap statistics will
have the same or higher used bytes as well as percentage).
- Newly added item count is always 0 on blockmap/checkmap
statistics while it has >0 for zone 8,9,10,11 for show.
Both hammer blockmap/checkmap are not aware of items in
each big-block so they can't count items. The idea of
item is countable only when iterating btree.
Summary of changes:
sbin/hammer/cmd_show.c | 37 ++++++++++++++-----
sbin/hammer/hammer_util.h | 3 ++
sbin/hammer/misc.c | 91 +++++++++++++++++++++++++++++++++++++++++------
3 files changed, 112 insertions(+), 19 deletions(-)
DragonFly BSD source repository
More information about the Commits