diff --git a/src/spikeinterface/core/job_tools.py b/src/spikeinterface/core/job_tools.py index db8d8f6339..cbe57340e5 100644 --- a/src/spikeinterface/core/job_tools.py +++ b/src/spikeinterface/core/job_tools.py @@ -359,7 +359,27 @@ def __init__( self.max_threads_per_process = max_threads_per_process if verbose: - print(self.job_name, "with n_jobs =", self.n_jobs, "and chunk_size =", self.chunk_size) + if self.n_jobs > 1: + chunk_memory = self.chunk_size * recording.get_num_channels() * np.dtype(recording.get_dtype()).itemsize + total_memory = chunk_memory * self.n_jobs + chunk_duration = self.chunk_size / recording.get_sampling_frequency() + from spikeinterface.core.core_tools import convert_bytes_to_str, convert_seconds_to_str + + chunk_memory_str = convert_bytes_to_str(chunk_memory) + total_memory_str = convert_bytes_to_str(total_memory) + chunk_duration_str = convert_seconds_to_str(chunk_duration) + print( + self.job_name, + "\n" + f"n_jobs={self.n_jobs} - " + f"samples_per_chunk={self.chunk_size:,} - " + f"chunk_memory={chunk_memory_str} - " + f"total_memory={total_memory_str} - " + f"chunk_duration={chunk_duration_str}", + ) + + else: + print(self.job_name, "with n_jobs =", self.n_jobs, "and chunk_size =", self.chunk_size) def run(self): """