add detailed metrics for storage layer

This commit is contained in:
Peter Zhang 2024-10-28 23:27:04 +08:00
parent c9624c3a1e
commit e2085d8b21
2 changed files with 4 additions and 0 deletions

View File

@ -192,6 +192,7 @@ impl LogStoreChunkWrite for LogManager {
chunks: ChunkArray,
maybe_file_proof: Option<FlowProof>,
) -> Result<bool> {
let start_time = Instant::now();
let mut merkle = self.merkle.write();
let tx = self
.tx_store
@ -224,6 +225,7 @@ impl LogStoreChunkWrite for LogManager {
)?;
self.flow_store.put_mpt_node_list(updated_node_list)?;
}
metrics::PUT_CHUNKS.update_since(start_time);
Ok(true)
}

View File

@ -5,6 +5,8 @@ use metrics::{register_timer, Timer};
lazy_static::lazy_static! {
pub static ref PUT_TX: Arc<dyn Timer> = register_timer("log_store_put_tx");
pub static ref PUT_CHUNKS: Arc<dyn Timer> = register_timer("log_store_put_chunks");
pub static ref TX_STORE_PUT: Arc<dyn Timer> = register_timer("log_store_tx_store_put_tx");
pub static ref CHECK_TX_COMPLETED: Arc<dyn Timer> =