Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: rgw: the value of total_time is wrong in the result of 'radosgw-admin log show' opt #11876

Merged
merged 1 commit into from Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rgw/rgw_admin.cc
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_log.cc
Expand Up @@ -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);
Expand Down