0g-storage-node/node/sync/src/controllers/metrics.rs

11 lines
697 B
Rust
Raw Normal View History

2024-08-20 09:32:03 +00:00
use std::sync::Arc;
2024-08-20 10:50:17 +00:00
use metrics::{register_timer, Counter, CounterUsize, Histogram, Sample, Timer};
2024-08-20 09:32:03 +00:00
lazy_static::lazy_static! {
pub static ref SERIAL_SYNC_FILE_COMPLETED: Arc<dyn Timer> = register_timer("sync_controllers_serial_sync_file_completed");
pub static ref SERIAL_SYNC_CHUNKS_COMPLETED: Arc<dyn Timer> = register_timer("sync_controllers_serial_sync_chunks_completed");
2024-08-20 10:50:17 +00:00
pub static ref SERIAL_SYNC_SEGMENT_LATENCY: Arc<dyn Histogram> = Sample::ExpDecay(0.015).register("sync_controllers_serial_sync_segment_latency", 1024);
pub static ref SERIAL_SYNC_UNEXPECTED_ERRORS: Arc<dyn Counter<usize>> = CounterUsize::register("sync_controllers_serial_sync_unexpected_errors");
2024-08-20 09:32:03 +00:00
}