Skip to content

Commit a15e086

Browse files
committed
ENH: Reorder profiler columns
1 parent a5f48d7 commit a15e086

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

nipype/interfaces/base/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ def run(self, **inputs):
530530

531531
runtime.prof_dict = {
532532
'time': vals[:, 0].tolist(),
533-
'rss_GiB': (vals[:, 1] / 1024).tolist(),
534-
'cpus': vals[:, 2].tolist(),
533+
'cpus': vals[:, 1].tolist(),
534+
'rss_GiB': (vals[:, 2] / 1024).tolist(),
535535
'vms_GiB': (vals[:, 3] / 1024).tolist(),
536536
}
537537

nipype/pipeline/engine/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ def write_workflow_resources(graph, filename=None, append=None):
13621362
'(mapflow %d/%d).', nodename, subidx + 1, len(rt_list))
13631363
continue
13641364

1365-
for key in ['time', 'rss_GiB', 'cpus', 'vms_GiB']:
1365+
for key in ['time', 'cpus', 'rss_GiB', 'vms_GiB']:
13661366
big_dict[key] += runtime.prof_dict[key]
13671367

13681368
big_dict['interface'] += [classname] * nsamples

nipype/utils/profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _sample(self, cpu_interval=None):
9494
except psutil.NoSuchProcess:
9595
pass
9696

97-
print('%f,%f,%f,%f' % (time(), rss / _MB, cpu, vms / _MB),
97+
print('%f,%f,%f,%f' % (time(), cpu, rss / _MB, vms / _MB),
9898
file=self._logfile)
9999
self._logfile.flush()
100100

0 commit comments

Comments
 (0)