mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Add metric for current epoch total balance (#5688)
* Add metric for current epoch total balance
This commit is contained in:
@@ -17,6 +17,10 @@ lazy_static! {
|
||||
"beacon_participation_prev_epoch_source_attesting_gwei_total",
|
||||
"Total effective balance (gwei) of validators who attested to the source in the previous epoch"
|
||||
);
|
||||
pub static ref PARTICIPATION_CURRENT_EPOCH_TOTAL_ACTIVE_GWEI_TOTAL: Result<IntGauge> = try_create_int_gauge(
|
||||
"beacon_participation_current_epoch_active_gwei_total",
|
||||
"Total effective balance (gwei) of validators who are active in the current epoch"
|
||||
);
|
||||
/*
|
||||
* Processing metrics
|
||||
*/
|
||||
|
||||
@@ -100,6 +100,10 @@ impl<E: EthSpec> EpochProcessingSummary<E> {
|
||||
&metrics::PARTICIPATION_PREV_EPOCH_SOURCE_ATTESTING_GWEI_TOTAL,
|
||||
self.previous_epoch_source_attesting_balance()? as i64,
|
||||
);
|
||||
metrics::set_gauge(
|
||||
&metrics::PARTICIPATION_CURRENT_EPOCH_TOTAL_ACTIVE_GWEI_TOTAL,
|
||||
self.current_epoch_total_active_balance() as i64,
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user