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
distsql, store/tikv: refine metrics. #2460
Conversation
Make metrics records helpful information.
resp, err := it.handleTask(bo, task) | ||
coprocessorHistogram.Observe(time.Since(startTime).Seconds()) | ||
backoffHistogram.Observe(float64(bo.totalSleep) / 1000) |
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.
It will record many 0 values.
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.
This is intended, we need task time subtract backoff time to get the pure coprocessor time.
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.
What does 'pure coprocessor time' mean exactly?
We already have tidb_tikvclient_request_seconds{type="cop"} for the request round trip, and also tikv_coprocessor_request_duration_seconds_bucket on server side. It may not be necessary to use subtraction.
LGTM |
@disksing PTAL |
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
Make metrics more helpful.