Skip to content

Commit

Permalink
Respect minimum / remove dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushisource committed Apr 23, 2024
1 parent 5886007 commit d848b99
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/worker/slot_supplier/resource_based.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ where
if must_wait_for > Duration::from_millis(0) {
tokio::time::sleep(must_wait_for).await;
}
} else {
let _ = self.last_slot_issued_tx.send(Instant::now());
return SlotSupplierPermit::NoData;
}
if let Some(p) = self.try_reserve_slot(ctx) {
return p;
Expand Down Expand Up @@ -233,10 +236,9 @@ impl RealSysInfo {
lock.refresh_processes();
lock.refresh_cpu_usage();
let proc = lock.process(self.pid).expect("exists");
self.cur_mem_usage
.store(dbg!(proc.memory()), Ordering::Release);
self.cur_mem_usage.store(proc.memory(), Ordering::Release);
self.cur_cpu_usage.store(
dbg!(lock.global_cpu_info().cpu_usage()).to_bits(),
lock.global_cpu_info().cpu_usage().to_bits(),
Ordering::Release,
);
self.last_refresh.store(Instant::now())
Expand Down

0 comments on commit d848b99

Please sign in to comment.