-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
rgw: add latency info in the log of req done #23906
rgw: add latency info in the log of req done #23906
Conversation
dongbula
commented
Sep 4, 2018
- References tracker ticket
- Updates documentation if necessary
- Includes tests for new functionality or reproducer for bug
@dongbula cant this be computed from the existing log messages? |
@mattbenjamin perfcounter stats some op's latency , but it is not existed in a log message now. I think it will be convenient if the latency can be found in a low-level log message |
@mattbenjamin hi, this is a simple modification, what do you think about it? |
@dongbula looks good to me, but a minor request for future enhancement: capture the time taking before the response header was sent and report that as well (my recent multi-delete improvement for example reduced the time-to-first-byte by 99.9% for some workloads) |
@robbat2 well, captured more times now |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
unstale me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm -- if this currently applies, don't see why we can't take this?
src/rgw/rgw_process.cc
Outdated
op->execute(); | ||
|
||
ldpp_dout(op, 2) << "completing" << dendl; | ||
ldpp_dout(op, 2) << "completing, latency=" << s->time_elapsed() << dendl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time_elapsed() is already included in this log output because of ldpp_dout()
and req_state::gen_prefix()
:
2018-11-07 10:09:50.918 7f7f157fa700 2 req 1 0.002s s3:list_buckets verifying op params
2018-11-07 10:09:50.918 7f7f157fa700 2 req 1 0.002s s3:list_buckets pre-executing
2018-11-07 10:09:50.918 7f7f157fa700 2 req 1 0.002s s3:list_buckets executing
2018-11-07 10:09:50.919 7f7f157fa700 2 req 1 0.003s s3:list_buckets completing
2018-11-07 10:09:50.919 7f7f157fa700 2 req 1 0.003s s3:list_buckets op status=0
2018-11-07 10:09:50.919 7f7f157fa700 2 req 1 0.003s http status=200
@cbodley ok, can we just close this one? |
@mattbenjamin the |
Signed-off-by: lvshuhua <lvshuhua@cmss.chinamobile.com>
@cbodley have simplified it |