diff --git a/src/ptbench/utils/resources.py b/src/ptbench/utils/resources.py index f7c7f6b958093a770bdc9c448b79e04a0b3dc704..bda05f203bdf80c73d92fa72df0c7f637244028f 100644 --- a/src/ptbench/utils/resources.py +++ b/src/ptbench/utils/resources.py @@ -342,8 +342,10 @@ def _monitor_worker( ra.acc() # guarantees at least an entry will be available if summary_event.is_set(): - queue.put(ra.summary()) + summary = ra.summary().copy() + queue.put(summary) ra.clear() + print(queue.get()) summary_event.clear() time.sleep(interval) @@ -416,7 +418,6 @@ class ResourceMonitor: """Forces the monitoring process to yield data and clear the internal accumlator.""" self.summary_event.set() - try: data: dict[str, list[int | float]] = self.q.get( timeout=2 * self.interval