add detailed metrics for storage layer

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

View File

@ -191,6 +191,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
@ -222,6 +223,7 @@ impl LogStoreChunkWrite for LogManager {
tx.start_entry_index,
)?;
}
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> =