move Metrics to utils (#1765)

This commit is contained in:
Andronik Ordian
2020-09-29 13:42:20 +02:00
committed by GitHub
parent 5d4eb6bdce
commit de05bec4d6
29 changed files with 99 additions and 120 deletions
@@ -5,7 +5,10 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
derive_more = "0.99.9"
futures = "0.3.5"
log = "0.4.8"
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
parity-scale-codec = { version = "1.3.0", default-features = false, features = ["bit-vec", "derive"] }
@@ -14,8 +17,7 @@ polkadot-primitives = { path = "../../../primitives" }
polkadot-parachain = { path = "../../../parachain" }
polkadot-node-primitives = { path = "../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
derive_more = "0.99.9"
log = "0.4.8"
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
[dev-dependencies]
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -27,6 +27,8 @@ use polkadot_subsystem::{
AllMessages, CandidateValidationMessage, RuntimeApiMessage,
ValidationFailed, RuntimeApiRequest,
},
};
use polkadot_node_subsystem_util::{
metrics::{self, prometheus},
};
use polkadot_subsystem::errors::RuntimeApiError;
@@ -113,8 +115,6 @@ impl<S, C> Subsystem<C> for CandidateValidationSubsystem<S> where
C: SubsystemContext<Message = CandidateValidationMessage>,
S: SpawnNamed + Clone + 'static,
{
type Metrics = Metrics;
fn start(self, ctx: C) -> SpawnedSubsystem {
SpawnedSubsystem {
name: "candidate-validation-subsystem",