Skip to content

Commit 0100135

Browse files
committed
read new monitoring.summary_file option
1 parent afa63dc commit 0100135

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

doc/users/config_file.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ Resource Monitor
166166
Sampling period (in seconds) between measurements of resources (memory, cpus)
167167
being used by an interface (default value: ``1``)
168168

169-
*summary_path*
170-
Path where the summary ``resource_monitor.json`` should be stored, when running
171-
a workflow (``summary_path`` does not apply to interfaces run independently).
169+
*summary_file*
170+
Indicates where the summary file collecting all profiling information from the
171+
resource monitor should be stored after execution of a workflow.
172+
The ``summary_file`` does not apply to interfaces run independently.
172173
(unset by default, in which case the summary file will be written out to
173174
``<base_dir>/resource_monitor.json`` of the top-level workflow).
174175

nipype/pipeline/engine/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,12 +1304,17 @@ def write_workflow_resources(graph, filename=None, append=None):
13041304
in a pandas DataFrame or processed with JavaScript like D3.js
13051305
"""
13061306
import simplejson as json
1307+
1308+
# Overwrite filename if nipype config is set
1309+
filename = config.get('monitoring', 'summary_file', filename)
1310+
1311+
# If filename still does not make sense, store in $PWD
13071312
if not filename:
13081313
filename = os.path.join(os.getcwd(), 'resource_monitor.json')
13091314

13101315
if append is None:
13111316
append = str2bool(config.get(
1312-
'execution', 'resource_monitor_append', 'true'))
1317+
'monitoring', 'summary_append', 'true'))
13131318

13141319
big_dict = {
13151320
'time': [],

0 commit comments

Comments
 (0)