mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(stages/metrics): use Counter instead of Gauge for mgas_processed (#7234)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
@ -85,11 +85,9 @@ impl MetricsListener {
|
||||
stage_metrics.entities_total.set(total as f64);
|
||||
}
|
||||
}
|
||||
MetricEvent::ExecutionStageGas { gas } => self
|
||||
.sync_metrics
|
||||
.execution_stage
|
||||
.mgas_processed_total
|
||||
.increment(gas as f64 / MGAS_TO_GAS as f64),
|
||||
MetricEvent::ExecutionStageGas { gas } => {
|
||||
self.sync_metrics.execution_stage.mgas_processed_total.increment(gas / MGAS_TO_GAS)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
use reth_metrics::{metrics::Gauge, Metrics};
|
||||
use reth_metrics::{
|
||||
metrics::{Counter, Gauge},
|
||||
Metrics,
|
||||
};
|
||||
use reth_primitives::stage::StageId;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@ -33,5 +36,5 @@ pub(crate) struct StageMetrics {
|
||||
#[metrics(scope = "sync.execution")]
|
||||
pub(crate) struct ExecutionStageMetrics {
|
||||
/// The total amount of gas processed (in millions)
|
||||
pub(crate) mgas_processed_total: Gauge,
|
||||
pub(crate) mgas_processed_total: Counter,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user