mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 05:18:30 +00:00
Add more eth1 metrics (#728)
* Add metrics for junk eth1 votes * Add eth1 cache metrics
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::metrics;
|
||||
use eth1::{Config as Eth1Config, Eth1Block, Service as HttpService};
|
||||
use eth2_hashing::hash;
|
||||
use exit_future::Exit;
|
||||
@@ -351,6 +352,8 @@ impl<T: EthSpec, S: Store<T>> Eth1ChainBackend<T> for CachingEth1Backend<T, S> {
|
||||
fn random_eth1_data() -> Eth1Data {
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
metrics::inc_counter(&metrics::JUNK_ETH1_VOTES);
|
||||
|
||||
macro_rules! rand_bytes {
|
||||
($num_bytes: expr) => {{
|
||||
let mut arr = [0_u8; $num_bytes];
|
||||
|
||||
@@ -153,6 +153,12 @@ lazy_static! {
|
||||
pub static ref CHECKPOINT_CACHE_MISSES: Result<IntCounter> =
|
||||
try_create_int_counter("beacon_checkpoint_cache_misses_total", "Count of times checkpoint cache fulfils request");
|
||||
|
||||
/*
|
||||
* Eth1
|
||||
*/
|
||||
pub static ref JUNK_ETH1_VOTES: Result<IntCounter> =
|
||||
try_create_int_counter("beacon_eth1_junk_votes", "Count of times we have voted junk for eth1 dat");
|
||||
|
||||
/*
|
||||
* Chain Head
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user