We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e95f3 commit 4073f39Copy full SHA for 4073f39
nipype/utils/profiler.py
@@ -2,7 +2,7 @@
2
# @Author: oesteban
3
# @Date: 2017-09-21 15:50:37
4
# @Last Modified by: oesteban
5
-# @Last Modified time: 2017-10-02 15:44:29
+# @Last Modified time: 2017-10-20 09:12:36
6
"""
7
Utilities to keep track of performance
8
@@ -77,9 +77,13 @@ def _sample(self, cpu_interval=None):
77
except psutil.NoSuchProcess:
78
pass
79
80
- # parent_mem = mem
81
# Iterate through child processes and get number of their threads
82
- for child in self._process.children(recursive=True):
+ try:
+ children = self._process.children(recursive=True)
83
+ except psutil.NoSuchProcess:
84
+ children = []
85
+
86
+ for child in children:
87
try:
88
with child.oneshot():
89
cpu += child.cpu_percent()
0 commit comments