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

distsql, store/tikv: refine metrics. #2460

Merged
merged 4 commits into from Jan 15, 2017

Conversation

coocood
Copy link
Member

@coocood coocood commented Jan 14, 2017

Make metrics more helpful.

Make metrics records helpful information.
@coocood
Copy link
Member Author

coocood commented Jan 14, 2017

resp, err := it.handleTask(bo, task)
coprocessorHistogram.Observe(time.Since(startTime).Seconds())
backoffHistogram.Observe(float64(bo.totalSleep) / 1000)
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

@tiancaiamao
Copy link
Contributor

LGTM

@coocood
Copy link
Member Author

coocood commented Jan 15, 2017

@disksing PTAL

Copy link
Contributor

@disksing disksing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hanfei1991 hanfei1991 merged commit 85e6afd into master Jan 15, 2017
@hanfei1991 hanfei1991 deleted the coocood/add-coprocessor-metrics branch January 15, 2017 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants