mirror of
				https://github.com/csehviktor/status-monitor.git
				synced 2025-08-08 18:06:14 +02:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										19
									
								
								agent/src/main.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								agent/src/main.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| use collector::Collector; | ||||
| use std::thread; | ||||
| use std::time; | ||||
|  | ||||
| pub mod collector; | ||||
|  | ||||
| const REFRESH_INTERVAL: u64 = 3000; | ||||
|  | ||||
| fn main() { | ||||
|     let mut collector = Collector::new(); | ||||
|  | ||||
|     loop { | ||||
|         let metrics = collector.collect_all(); | ||||
|  | ||||
|         println!("Metrics: {:?}", metrics); | ||||
|  | ||||
|         thread::sleep(time::Duration::from_millis(REFRESH_INTERVAL)); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user