add chrono for benchmarking

This commit is contained in:
rmanach
2023-04-18 13:58:10 +02:00
parent 4906b397ba
commit 8a0fd00fb9
5 changed files with 294 additions and 13 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
mod worker;
pub use worker::{Manager, Queue};
pub use worker::{Manager, Queue, WorkerStatus};
+1 -2
View File
@@ -106,8 +106,7 @@ impl<T: Runner + std::marker::Send + 'static> Manager<T> {
self.queue.not_empty.notify_one();
}
#[allow(dead_code)]
fn healthcheck(&self, target: WorkerStatus) -> bool {
pub fn healthcheck(&self, target: WorkerStatus) -> bool {
for w in &self.workers {
if w.lock().unwrap().get_status() != target {
return false;