(
server_url: &str,
udid: &str,
pid: Option<i32>,
interval: f64,
)
| 60 | } |
| 61 | |
| 62 | fn run_stats_watch( |
| 63 | server_url: &str, |
| 64 | udid: &str, |
| 65 | pid: Option<i32>, |
| 66 | interval: f64, |
| 67 | ) -> anyhow::Result<()> { |
| 68 | let interval = Duration::from_secs_f64(interval.clamp(0.25, 60.0)); |
| 69 | loop { |
| 70 | let stats = service_performance_json(server_url, udid, pid)?; |
| 71 | print_performance_line(&stats)?; |
| 72 | std::thread::sleep(interval); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | fn print_performance_line(stats: &Value) -> anyhow::Result<()> { |
| 77 | let current = stats |
no test coverage detected