batch_system: Add fsm schedule related metrics#17723
batch_system: Add fsm schedule related metrics#17723ti-chi-bot[bot] merged 11 commits intotikv:masterfrom
Conversation
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
a952cc7 to
150433a
Compare
| struct MetricsCollector<N: Fsm> { | ||
| timer: Instant, // time since polled | ||
| round: usize, // how many round the fsm has been continuously polled | ||
| _phantom: std::marker::PhantomData<N>, |
There was a problem hiding this comment.
| _phantom: std::marker::PhantomData<N>, | |
| fsm_type: String, |
How about adding a String? It makes the code cleaner.
There was a problem hiding this comment.
the static metric vector get() only accepts the enum instead of string
| ) | ||
| .unwrap(); | ||
|
|
||
| pub static ref FSM_RESCHEDULE_COUNTER_VEC: IntCounterVec = register_int_counter_vec!( |
There was a problem hiding this comment.
Why aren't these reschedule metrics shown in the graph of your comments?
There was a problem hiding this comment.
the screen is not big enough :)
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
| }; | ||
|
|
||
| match sender.send(FsmTypes::Normal(fsm), None) { | ||
| match sender.send(FsmTypes::Normal((fsm, Instant::now_coarse())), None) { |
There was a problem hiding this comment.
The precision of now_coarse is typically ms level and I think it may mislead someone.
There was a problem hiding this comment.
I think ms is enough here
|
LGTM |
|
@hhwyt: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| pub static ref FSM_POLL_ROUND: FsmPollRoundVec = | ||
| auto_flush_from!(FSM_POLL_ROUND_VEC, FsmPollRoundVec); | ||
|
|
||
| pub static ref FSM_COUNT_PER_POLL_VEC: HistogramVec = |
There was a problem hiding this comment.
It would be even better if we can see this metric per poller. But that might not be easy to achieve.
There was a problem hiding this comment.
I don't think per poller gives extra information
Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Connor <zbk602423539@gmail.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Connor <zbk602423539@gmail.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Connor <zbk602423539@gmail.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Connor <zbk602423539@gmail.com>
Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Connor <zbk602423539@gmail.com>
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
[LGTM Timeline notifier]Timeline:
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Connor1996, glorv, hhwyt, SpadeA-Tang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ref #15990 Add fsm schedule related metrics Signed-off-by: Connor <zbk602423539@gmail.com> Signed-off-by: Connor1996 <zbk602423539@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com>
ref tikv#15990 Add fsm schedule related metrics Signed-off-by: Connor <zbk602423539@gmail.com> Signed-off-by: Connor1996 <zbk602423539@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com>
ref #15990 Add fsm schedule related metrics Signed-off-by: Connor <zbk602423539@gmail.com> Signed-off-by: Connor1996 <zbk602423539@gmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com> Co-authored-by: Connor <zbk602423539@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
ref tikv#15990 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
ref tikv#15990 Add fsm schedule related metrics Signed-off-by: Connor <zbk602423539@gmail.com> Signed-off-by: Connor1996 <zbk602423539@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com>
ref tikv#15990 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
ref #15990, close #18684 Add fsm schedule related metrics Signed-off-by: Connor <zbk602423539@gmail.com> Signed-off-by: Connor1996 <zbk602423539@gmail.com> Signed-off-by: Neil Shen <overvenus@gmail.com> Co-authored-by: Connor <zbk602423539@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
ref tikv#15990 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
In response to a cherrypick label: new pull request created to branch |
close tikv#18800, ref tikv#17723 1. in raftstore add apply_msg_len.flush() to trigger metric dump; 2. in raftsotre_v2 add corresponding hist.observe() in handle_all_tasks(); Signed-off-by: squalfof <squalfof@gmail.com>
close tikv#18800, ref tikv#17723 In raftstore/ add apply_msg_len.flush() to trigger metric dump. Signed-off-by: squalfof <squalfof@gmail.com>
close tikv#18800, ref tikv#17723 In raftstore/ add apply_msg_len.flush() to trigger metric dump. Signed-off-by: squalfof <squalfof@gmail.com>
What is changed and how it works?
Issue Number: close #18684
What's Changed:
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note