From 1a092f01f1a945a330fe19e96a8de507823fc28e Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 31 Jan 2022 09:08:57 -0800 Subject: [PATCH] Use a label formatter for prettier histograms. --- executors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/executors.py b/executors.py index 47b4a89..28507b0 100644 --- a/executors.py +++ b/executors.py @@ -158,7 +158,7 @@ class ThreadExecutor(BaseExecutor): def shutdown(self, wait=True) -> None: if not self.already_shutdown: logger.debug(f'Shutting down threadpool executor {self.title}') - print(self.histogram) + print(self.histogram.__repr__(label_formatter='%d')) self._thread_pool_executor.shutdown(wait) self.already_shutdown = True @@ -201,7 +201,7 @@ class ProcessExecutor(BaseExecutor): if not self.already_shutdown: logger.debug(f'Shutting down processpool executor {self.title}') self._process_executor.shutdown(wait) - print(self.histogram) + print(self.histogram.__repr__(label_formatter='%d')) self.already_shutdown = True def __getstate__(self): @@ -1113,7 +1113,7 @@ class RemoteExecutor(BaseExecutor): self.heartbeat_stop_event.set() self.heartbeat_thread.join() self._helper_executor.shutdown(wait) - print(self.histogram) + print(self.histogram.__repr__(label_formatter='%d')) self.already_shutdown = True -- 2.46.0