From 5856a6bb6e06c71822b41801a69532a22668bf0d Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 19 Aug 2015 23:35:44 +0300 Subject: [PATCH] lmdb: output subtotal % info for each dbi-table. Change-Id: I897d9fcdf9df4149045a0867a982716bfe7acbe4 --- mdb_chk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mdb_chk.c b/mdb_chk.c index 086500fe..363a3c4d 100644 --- a/mdb_chk.c +++ b/mdb_chk.c @@ -691,8 +691,9 @@ int main(int argc, char *argv[]) total_page_bytes - total_payload_bytes); for (i = 1; i < MAX_DBI && dbi_names[i]; ++i) { size_t dbi_bytes = dbi_pages[i] * stat.ms_psize; - print(" %s: %zu total, payload %.2f%% (%zu), unused %.2f%% (%zu)\n", - dbi_names[i], dbi_bytes, + print(" %s: subtotal %.2f%% (%zu), payload %.2f%% (%zu), unused %.2f%% (%zu)\n", + dbi_names[i], + dbi_bytes * 100.0 / total_page_bytes, dbi_bytes, dbi_payload_bytes[i] * 100.0 / dbi_bytes, dbi_payload_bytes[i], (dbi_bytes - dbi_payload_bytes[i]) * 100.0 / dbi_bytes, dbi_bytes - dbi_payload_bytes[i]);