From a20ca93d048ba1f9db27711ea7bcd9973c3b0770 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 5 Aug 2019 12:17:01 -0400 Subject: [PATCH] https ! --- diagnostics.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/diagnostics.py b/diagnostics.py index 4bc0f23..180d2e6 100755 --- a/diagnostics.py +++ b/diagnostics.py @@ -13,10 +13,15 @@ import resource import sys from collections import Mapping, Container from sys import getsizeof +import threading + import cherrypy from cherrypy.lib.sessions import RamSession from Page import Page +def thread_info(): + return [t.name for t in threading.enumerate()] + def deep_getsizeof(o, ids): """Find the memory footprint of a Python object @@ -66,5 +71,6 @@ class DiagnosticsPage (Page): stats['allocated_blocks'] = sys.getallocatedblocks() stats['rusage_self'] = resource.getrusage(resource.RUSAGE_SELF) stats['rusage_children'] = resource.getrusage(resource.RUSAGE_CHILDREN) + stats['thread_info'] = thread_info() return stats