Skip to content

Commit 403961f

Browse files
committed
fix unconsistency of runtime attributes
1 parent 966b7f1 commit 403961f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipype/pipeline/engine/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,8 @@ def write_report(self, report_type=None, cwd=None):
749749
'duration': self.result.runtime.duration}
750750
# Try and insert memory/threads usage if available
751751
if resource_monitor:
752-
rst_dict['runtime_memory_gb'] = getattr(self.result.runtime, 'mem_peak_gb')
753-
rst_dict['runtime_threads'] = getattr(self.result.runtime, 'nthreads_max')
752+
rst_dict['mem_peak_gb'] = self.result.runtime.mem_peak_gb
753+
rst_dict['cpu_percent'] = self.result.runtime.cpu_percent
754754

755755
if hasattr(self.result.runtime, 'cmdline'):
756756
rst_dict['command'] = self.result.runtime.cmdline

nipype/utils/profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def log_nodes_cb(node, status):
138138
'finish': getattr(node.result.runtime, 'endTime'),
139139
'duration': getattr(node.result.runtime, 'duration'),
140140
'runtime_threads': getattr(
141-
node.result.runtime, 'nthreads_max', 'N/A'),
141+
node.result.runtime, 'cpu_percent', 'N/A'),
142142
'runtime_memory_gb': getattr(
143143
node.result.runtime, 'mem_peak_gb', 'N/A'),
144144
'estimated_memory_gb': node.mem_gb,

0 commit comments

Comments
 (0)