This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Add prometheus metrics for block authorship#10316
Merged
paritytech-processbot[bot] merged 7 commits intomasterfrom Nov 19, 2021
Merged
Add prometheus metrics for block authorship#10316paritytech-processbot[bot] merged 7 commits intomasterfrom
paritytech-processbot[bot] merged 7 commits intomasterfrom
Conversation
bkchr
reviewed
Nov 19, 2021
| self.metrics.report(|metrics| { | ||
| metrics | ||
| .create_inherents_time | ||
| .observe(create_inherents_timer.elapsed().as_secs_f64()); |
Member
There was a problem hiding this comment.
Suggested change
| .observe(create_inherents_timer.elapsed().as_secs_f64()); | |
| .observe(create_inherents_timer.elapsed().as_secs_f64()); |
Please use saturating_duration_since here and below. We already have seen that calls like this panicked because of some fault timers.
drahnr
approved these changes
Nov 19, 2021
Contributor
There was a problem hiding this comment.
LGTM besides the mentioned need to use https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since rather than fn elapsed(..)
bkchr
approved these changes
Nov 19, 2021
Member
bkchr
left a comment
There was a problem hiding this comment.
We need to change the order, otherwise looks good.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Contributor
|
bot merge |
|
Waiting for commit status. |
23 tasks
grishasobol
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Mar 28, 2022
* Add prom metric to basic authorship * Add proposer_block_proposal_time * +nightly-2021-10-29 fmt * Use saturating_duration_since, not elasped * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * +nightly-2021-10-29 fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
* Add prom metric to basic authorship * Add proposer_block_proposal_time * +nightly-2021-10-29 fmt * Use saturating_duration_since, not elasped * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * +nightly-2021-10-29 fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes paritytech/polkadot#4327
New metrics:
proposer_block_proposal_time: Time to create a block for proposal. This is a superset of bothproposer_block_constructedandcreate_inherents_time.proposer_create_inherents_time: Time to create the inherents for the block that is about to be constructed. This is a subset ofproposer_block_proposal_timebut does not overlap withproposer_block_constructed.Existing metrics:
proposer_block_constructed: Time to construct a block for proposal. This is a subset ofproposer_block_proposal_timeand does not overlap withpropser_create_inherents_timeblock_verification_time: Time to verify a block (takes place directly prior to importing)block_verification_and_import_time: Time to verify a block and then import a block. A superset ofblock_verification_time