reth_basic_payload_builder/
metrics.rsuse reth_metrics::{metrics::Counter, Metrics};
#[derive(Metrics)]
#[metrics(scope = "payloads")]
pub(crate) struct PayloadBuilderMetrics {
pub(crate) requested_empty_payload: Counter,
pub(crate) initiated_payload_builds: Counter,
pub(crate) failed_payload_builds: Counter,
}
impl PayloadBuilderMetrics {
pub(crate) fn inc_requested_empty_payload(&self) {
self.requested_empty_payload.increment(1);
}
pub(crate) fn inc_initiated_payload_builds(&self) {
self.initiated_payload_builds.increment(1);
}
pub(crate) fn inc_failed_payload_builds(&self) {
self.failed_payload_builds.increment(1);
}
}