mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00
add detailed metrics for storage layer
This commit is contained in:
parent
9d2303b9b3
commit
8bd2b079e6
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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> =
|
||||
|
Loading…
Reference in New Issue
Block a user