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

Add tikv_raftstore_event_duration to metrics; #3657

Merged
merged 1 commit into from Oct 15, 2018

Conversation

@solotzg
Copy link
Contributor

solotzg commented Oct 9, 2018

Signed-off-by: Tong Zhigao tongzhigao@pingcap.com

What have you changed? (mandatory)

  • Add metrics tikv_raftstore_event_duration to show time cost of each Tick in raftstore;

What are the type of the changes? (mandatory)

  • New feature

How has this PR been tested? (mandatory)

  • manually integration tests

Does this PR affect documentation (docs/docs-cn) update? (mandatory)

Does this PR affect tidb-ansible update? (mandatory)

Refer to a related PR or issue link (optional)

Benchmark result if necessary (optional)

Add a few positive/negative examples (optional)

@solotzg solotzg requested a review from huachaohuang Oct 9, 2018
src/raftstore/store/metrics.rs Outdated Show resolved Hide resolved
src/raftstore/store/msg.rs Outdated Show resolved Hide resolved
@solotzg solotzg force-pushed the solotzg:master branch 2 times, most recently from ff87201 to d10c4a0 Oct 9, 2018
src/raftstore/store/fsm/store.rs Outdated Show resolved Hide resolved
src/raftstore/store/metrics.rs Outdated Show resolved Hide resolved
src/raftstore/store/metrics.rs Outdated Show resolved Hide resolved
@solotzg solotzg force-pushed the solotzg:master branch 2 times, most recently from 2e596a8 to ab0b489 Oct 10, 2018
@solotzg solotzg changed the title Add raft_store_event_tick_duration to metrics; Add tikv_raftstore_event_duration to metrics; Oct 10, 2018
@@ -124,6 +126,24 @@ pub enum Tick {
CleanupImportSST,
}

impl Tick {
pub fn handle_with_tag<F, G>(self, f: F) -> G

This comment has been minimized.

Copy link
@overvenus

overvenus Oct 11, 2018

Contributor

Why not pub fn tag(&self) -> &'static str?

This comment has been minimized.

Copy link
@solotzg

solotzg Oct 11, 2018

Author Contributor

@overvenus
The rust-clippy will make it failed and force me to use pub fn tag(self) -> &'static str.
If want to use the ref of a mutable static obj directly, you need unsafe code. However, when around with RefCell, it's impossible to use the ref outside.

@solotzg solotzg force-pushed the solotzg:master branch from ab0b489 to ad90e29 Oct 12, 2018
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
@solotzg

This comment has been minimized.

Copy link
Contributor Author

solotzg commented Oct 13, 2018

@overvenus PTAL. I've already change to pub fn tag(self) -> &'static str . This PR is required by another 😂

Copy link
Contributor

overvenus left a comment

Rest LGTM

Copy link
Contributor

huachaohuang left a comment

LGTM

Copy link
Member

Connor1996 left a comment

LGTM

@Connor1996 Connor1996 added the S: LGT2 label Oct 15, 2018
@Connor1996 Connor1996 merged commit b8f5e5a into tikv:master Oct 15, 2018
3 checks passed
3 checks passed
DCO All commits are signed off!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
jenkins-ci-tikv/build Jenkins job succeeded.
Details
solotzg added a commit to solotzg/tikv that referenced this pull request Oct 23, 2018
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
disksing added a commit that referenced this pull request Oct 23, 2018
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
overvenus added a commit that referenced this pull request Nov 6, 2018
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.