mirror of
https://github.com/mikedilger/chorus.git
synced 2026-08-31 07:31:01 +00:00
Add more statistics
This commit is contained in:
parent
6d7d3f4afe
commit
006ecadf9c
@ -179,10 +179,10 @@ async fn main() -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
|
||||
chorus::print_stats();
|
||||
|
||||
log::info!(target: "Server", "Syncing and shutting down.");
|
||||
let _ = GLOBALS.store.get().unwrap().sync();
|
||||
|
||||
chorus::print_stats();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -595,6 +595,15 @@ pub fn print_stats() {
|
||||
GLOBALS.bytes_outbound.load(Ordering::Relaxed),
|
||||
(GLOBALS.bytes_outbound.load(Ordering::Relaxed) as f32) / (runtime as f32)
|
||||
);
|
||||
if let Ok(status) = GLOBALS.store.get().unwrap().stats() {
|
||||
log::info!(
|
||||
target: "Server",
|
||||
"Store: {} event bytes in {} events, {} bytes for the indexes",
|
||||
status.event_bytes,
|
||||
status.index_stats.i_index_entries,
|
||||
status.index_stats.disk_usage
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Load config file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user