[pbs-devel] [PATCH proxmox-backup 02/13] metric collection: add doc comments for public functions

Lukas Wagner l.wagner at proxmox.com
Fri Oct 11 12:51:26 CEST 2024


Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 src/server/metric_collection/mod.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/server/metric_collection/mod.rs b/src/server/metric_collection/mod.rs
index e220f51a..1ca13222 100644
--- a/src/server/metric_collection/mod.rs
+++ b/src/server/metric_collection/mod.rs
@@ -21,12 +21,20 @@ use crate::{
     tools::disks::{zfs_dataset_stats, BlockDevStat, DiskManage},
 };
 
+/// Initialize the metric collection subsystem.
+///
+/// Any datapoints in the RRD journal will be committed.
 pub fn init() -> Result<(), Error> {
     let rrd_cache = initialize_rrd_cache()?;
     rrd_cache.apply_journal()?;
     Ok(())
 }
 
+/// Spawns a tokio task for regular metric collection.
+///
+/// Every 10 seconds, host and disk stats will be collected and
+///   - stored in the RRD
+///   - sent to any configured metric servers
 pub fn start_collection_task() {
     tokio::spawn(async {
         let abort_future = pin!(proxmox_daemon::shutdown_future());
-- 
2.39.5





More information about the pbs-devel mailing list