added debugging for metrics collection
This commit is contained in:
@@ -21,8 +21,12 @@ impl Collector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn run(&mut self, base_url: &str) -> anyhow::Result<(), Box<dyn Error>> {
|
pub async fn run(&mut self, base_url: &str) -> Result<(), Box<dyn Error>> {
|
||||||
loop {
|
loop {
|
||||||
|
println!(
|
||||||
|
"[{}] Starting metrics collection...",
|
||||||
|
chrono::Local::now().format("%H:%M:%S")
|
||||||
|
);
|
||||||
let metrics = self.collect().await?;
|
let metrics = self.collect().await?;
|
||||||
api::send_metrics(base_url, &metrics).await?;
|
api::send_metrics(base_url, &metrics).await?;
|
||||||
tokio::time::sleep(Duration::from_secs(20)).await;
|
tokio::time::sleep(Duration::from_secs(20)).await;
|
||||||
|
Reference in New Issue
Block a user