mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 06:08:21 +08:00
mdbx-tools: avoid output NaN from mdbx_chk for empty tables.
Change-Id: Ie1ff87da3a5e5e124eac1dafd7d5b456f8bde6e3
This commit is contained in:
parent
48655b41fb
commit
ce0e5d67f5
@ -1177,7 +1177,8 @@ int main(int argc, char *argv[]) {
|
||||
total_page_bytes);
|
||||
if (verbose > 2) {
|
||||
for (walk_dbi_t *dbi = walk.dbi; dbi < walk.dbi + MAX_DBI && dbi->name;
|
||||
++dbi) {
|
||||
++dbi)
|
||||
if (dbi->pages.total) {
|
||||
uint64_t dbi_bytes = dbi->pages.total * envstat.ms_psize;
|
||||
print(" %s: subtotal %" PRIu64 " bytes (%.1f%%),"
|
||||
" payload %" PRIu64 " (%.1f%%), unused %" PRIu64 " (%.1f%%)",
|
||||
@ -1190,7 +1191,8 @@ int main(int argc, char *argv[]) {
|
||||
if (dbi->lost_bytes)
|
||||
print(", %" PRIu64 " bytes lost", dbi->lost_bytes);
|
||||
print("\n");
|
||||
}
|
||||
} else
|
||||
print(" %s: empty\n", dbi->name);
|
||||
}
|
||||
print(" - summary: average fill %.1f%%",
|
||||
walk.total_payload_bytes * 100.0 / total_page_bytes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user