Add block construction prometheus metrics (#6030)

* Add basic authorship metrics

* fixes

* no arc

* move to crate

* Update client/proposer-metrics/Cargo.toml

Co-authored-by: Max Inden <mail@max-inden.de>

* remove prefix

* use HistogramTimer

* Update client/proposer-metrics/src/lib.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>

* 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>

* 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>

* Update client/proposer-metrics/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update client/proposer-metrics/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Nikolay Volf
2020-05-18 16:48:44 +03:00
committed by GitHub
parent 09a16a30a6
commit dd573374e0
11 changed files with 139 additions and 16 deletions
+4 -2
View File
@@ -173,7 +173,8 @@ macro_rules! new_full {
if let sc_service::config::Role::Authority { .. } = &role {
let proposer = sc_basic_authorship::ProposerFactory::new(
service.client(),
service.transaction_pool()
service.transaction_pool(),
service.prometheus_registry().as_ref(),
);
let client = service.client();
@@ -552,7 +553,8 @@ mod tests {
let mut proposer_factory = sc_basic_authorship::ProposerFactory::new(
service.client(),
service.transaction_pool()
service.transaction_pool(),
None,
);
let epoch_descriptor = babe_link.epoch_changes().lock().epoch_descriptor_for_child_of(