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.
2 parents f68ba06 + 9cfb795 commit 782dc0cCopy full SHA for 782dc0c
instana/meter.py
@@ -235,9 +235,9 @@ def collect_metrics(self):
235
threshold2=th[2])
236
237
thr = t.enumerate()
238
- daemon_threads = len([tr.daemon and tr.is_alive() for tr in thr])
239
- alive_threads = len([not tr.daemon and tr.is_alive() for tr in thr])
240
- dead_threads = len([not tr.is_alive() for tr in thr])
+ daemon_threads = [tr.daemon and tr.is_alive() for tr in thr].count(True)
+ alive_threads = [not tr.daemon and tr.is_alive() for tr in thr].count(True)
+ dead_threads = [not tr.is_alive() for tr in thr].count(True)
241
242
m = Metrics(ru_utime=u[0] if not self.last_usage else u[0] - self.last_usage[0],
243
ru_stime=u[1] if not self.last_usage else u[1] - self.last_usage[1],
0 commit comments