From: weiqiaomiao Date: Tue, 11 Oct 2016 11:32:43 +0000 (+0800) Subject: rgw: fix the field 'total_time' of log entry in log show opt X-Git-Tag: v10.2.6~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a3c10f670b3a6c88a230715e301913ca64309a8;p=ceph.git rgw: fix the field 'total_time' of log entry in log show opt Fixes: http://tracker.ceph.com/issues/17598 Signed-off-by: weiqiaomiao (cherry picked from commit 8f4825c5f012c77a3a91e22706dcab9c6067d77e) --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 281e7be2385..3bb6768d50e 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -4120,7 +4120,7 @@ int main(int argc, char **argv) formatter->open_array_section("log_entries"); do { - uint64_t total_time = entry.total_time.sec() * 1000000LL * entry.total_time.usec(); + uint64_t total_time = entry.total_time.sec() * 1000000LL + entry.total_time.usec(); agg_time += total_time; agg_bytes_sent += entry.bytes_sent; diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 3bef606b104..612e1ee5471 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -245,7 +245,7 @@ void rgw_format_ops_log_entry(struct rgw_log_entry& entry, Formatter *formatter) formatter->dump_int("bytes_sent", entry.bytes_sent); formatter->dump_int("bytes_received", entry.bytes_received); formatter->dump_int("object_size", entry.obj_size); - uint64_t total_time = entry.total_time.sec() * 1000000LL * entry.total_time.usec(); + uint64_t total_time = entry.total_time.sec() * 1000000LL + entry.total_time.usec(); formatter->dump_int("total_time", total_time); formatter->dump_string("user_agent", entry.user_agent);