diff --git a/src/bin/local.rs b/src/bin/local.rs index 246e19c8..d4dbfcec 100644 --- a/src/bin/local.rs +++ b/src/bin/local.rs @@ -177,6 +177,15 @@ fn main() { .ok().expect("`threads` should be an integer"); Scheduler::new().with_workers(threads).run(move|| { + if matches.occurrences_of("VERBOSE") >= 1 { + Scheduler::spawn(move|| { + loop { + coio::sleep_ms(1000); + debug!("Running coroutines: {}", Scheduler::instance().work_count()); + } + }); + } + RelayLocal::new(config).run(); }).unwrap(); } diff --git a/src/bin/server.rs b/src/bin/server.rs index 741e6d37..393cc8e5 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -171,6 +171,15 @@ fn main() { .ok().expect("`threads` should be an integer"); Scheduler::new().with_workers(threads).run(move|| { + if matches.occurrences_of("VERBOSE") >= 1 { + Scheduler::spawn(move|| { + loop { + coio::sleep_ms(1000); + debug!("Running coroutines: {}", Scheduler::instance().work_count()); + } + }); + } + RelayServer::new(config).run(); }).unwrap(); }