From 22dcbf9e48aa7a112c26bf5f80db7ec471853a1e Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 22 Sep 2017 01:19:57 +0530 Subject: [PATCH] Document Router.profiling. --- mitogen/master.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mitogen/master.py b/mitogen/master.py index e64e1796..bb3619db 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -753,6 +753,17 @@ class ChildIdAllocator(object): class Router(mitogen.core.Router): debug = False + + #: When enabled, causes the broker thread and any subsequent broker and + #: main threads existing in any child to write + #: ``/tmp/mitogen.stats...log`` containing a + #: :py:mod:`cProfile` dump on graceful exit. Must be set prior to any + #: :py:class:`Broker` being constructed, e.g. via: + #: + #: .. code:: + #: + #: mitogen.master.Router.profiling = True + #: profiling = False def __init__(self, *args, **kwargs):