mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
rgw: use RGWStorageStats::dump() to format 'bucket stats'
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
df64c45803
commit
b6e6fc107e
@ -976,11 +976,7 @@ static void dump_bucket_usage(map<RGWObjCategory, RGWStorageStats>& stats, Forma
|
||||
RGWStorageStats& s = iter->second;
|
||||
const char *cat_name = rgw_obj_category_name(iter->first);
|
||||
formatter->open_object_section(cat_name);
|
||||
formatter->dump_int("size", s.size);
|
||||
formatter->dump_int("size_actual", s.size_rounded);
|
||||
formatter->dump_int("size_kb", rgw_rounded_kb(s.size));
|
||||
formatter->dump_int("size_kb_actual", rgw_rounded_kb(s.size_rounded));
|
||||
formatter->dump_int("num_objects", s.num_objects);
|
||||
s.dump(formatter);
|
||||
formatter->close_section();
|
||||
}
|
||||
formatter->close_section();
|
||||
|
@ -594,9 +594,9 @@ void RGWBucketEntryPoint::decode_json(JSONObj *obj) {
|
||||
void RGWStorageStats::dump(Formatter *f) const
|
||||
{
|
||||
encode_json("size", size, f);
|
||||
encode_json("size_rounded", size_rounded, f);
|
||||
encode_json("num_kb", rgw_rounded_kb(size), f);
|
||||
encode_json("num_kb_rounded", rgw_rounded_kb(size_rounded), f);
|
||||
encode_json("size_actual", size_rounded, f);
|
||||
encode_json("size_kb", rgw_rounded_kb(size), f);
|
||||
encode_json("size_kb_actual", rgw_rounded_kb(size_rounded), f);
|
||||
encode_json("num_objects", num_objects, f);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user