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
d7973249a2
commit
16c587a470
@ -191,6 +191,7 @@ impl LogStoreChunkWrite for LogManager {
|
|||||||
chunks: ChunkArray,
|
chunks: ChunkArray,
|
||||||
maybe_file_proof: Option<FlowProof>,
|
maybe_file_proof: Option<FlowProof>,
|
||||||
) -> Result<bool> {
|
) -> Result<bool> {
|
||||||
|
let start_time = Instant::now();
|
||||||
let mut merkle = self.merkle.write();
|
let mut merkle = self.merkle.write();
|
||||||
let tx = self
|
let tx = self
|
||||||
.tx_store
|
.tx_store
|
||||||
@ -222,6 +223,7 @@ impl LogStoreChunkWrite for LogManager {
|
|||||||
tx.start_entry_index,
|
tx.start_entry_index,
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
metrics::PUT_CHUNKS.update_since(start_time);
|
||||||
Ok(true)
|
Ok(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ use metrics::{register_timer, Timer};
|
|||||||
lazy_static::lazy_static! {
|
lazy_static::lazy_static! {
|
||||||
pub static ref PUT_TX: Arc<dyn Timer> = register_timer("log_store_put_tx");
|
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 TX_STORE_PUT: Arc<dyn Timer> = register_timer("log_store_tx_store_put_tx");
|
||||||
|
|
||||||
pub static ref CHECK_TX_COMPLETED: Arc<dyn Timer> =
|
pub static ref CHECK_TX_COMPLETED: Arc<dyn Timer> =
|
||||||
|
Loading…
Reference in New Issue
Block a user