mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 08:52:54 +00:00
Add more metrics, tidy existing metrics
This commit is contained in:
@@ -7,6 +7,8 @@ lazy_static! {
|
||||
try_create_int_gauge("slotclock_present_slot", "The present wall-clock slot");
|
||||
pub static ref PRESENT_EPOCH: Result<IntGauge> =
|
||||
try_create_int_gauge("slotclock_present_epoch", "The present wall-clock epoch");
|
||||
pub static ref SLOTS_PER_EPOCH: Result<IntGauge> =
|
||||
try_create_int_gauge("slotclock_slots_per_epoch", "Slots per epoch (constant)");
|
||||
pub static ref MILLISECONDS_PER_SLOT: Result<IntGauge> = try_create_int_gauge(
|
||||
"slotclock_slot_time_milliseconds",
|
||||
"The duration in milliseconds between each slot"
|
||||
@@ -25,5 +27,6 @@ pub fn scrape_for_metrics<T: EthSpec, U: SlotClock>(clock: &U) {
|
||||
&PRESENT_EPOCH,
|
||||
present_slot.epoch(T::slots_per_epoch()).as_u64() as i64,
|
||||
);
|
||||
set_gauge(&SLOTS_PER_EPOCH, T::slots_per_epoch() as i64);
|
||||
set_gauge(&MILLISECONDS_PER_SLOT, clock.slot_duration_millis() as i64);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user