mempool: make dump more concise

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-05-31 16:53:33 -04:00
parent 569125c48e
commit affc9ef69c

View File

@ -113,12 +113,14 @@ void mempool::pool_t::dump(ceph::Formatter *f, stats_t *ptotal) const
if (ptotal) {
*ptotal += total;
}
f->dump_object("total", total);
total.dump(f);
if (!by_type.empty()) {
f->open_object_section("by_type");
for (auto &i : by_type) {
f->open_object_section(i.first.c_str());
i.second.dump(f);
f->close_section();
}
f->close_section();
}
}