mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-26 01:03:40 +00:00
Add more metrics, tidy existing metrics
This commit is contained in:
@@ -827,8 +827,12 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
return Ok(BlockProcessingOutcome::GenesisBlock);
|
||||
}
|
||||
|
||||
let block_root_timer = metrics::start_timer(&metrics::BLOCK_PROCESSING_BLOCK_ROOT);
|
||||
|
||||
let block_root = block.canonical_root();
|
||||
|
||||
metrics::stop_timer(block_root_timer);
|
||||
|
||||
if block_root == self.genesis_block_root {
|
||||
return Ok(BlockProcessingOutcome::GenesisBlock);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,10 @@ lazy_static! {
|
||||
);
|
||||
pub static ref BLOCK_PROCESSING_TIMES: Result<Histogram> =
|
||||
try_create_histogram("beacon_block_processing_seconds", "Full runtime of block processing");
|
||||
pub static ref BLOCK_PROCESSING_BLOCK_ROOT: Result<Histogram> = try_create_histogram(
|
||||
"beacon_block_processing_block_root_seconds",
|
||||
"Time spent calculating the block root when processing a block."
|
||||
);
|
||||
pub static ref BLOCK_PROCESSING_DB_READ: Result<Histogram> = try_create_histogram(
|
||||
"beacon_block_processing_db_read_seconds",
|
||||
"Time spent loading block and state from DB for block processing"
|
||||
|
||||
Reference in New Issue
Block a user