mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
Track the cpu used in the main thread by each logging context
This commit is contained in:
parent
b8680b82c3
commit
48a2526d62
3 changed files with 72 additions and 10 deletions
|
@ -64,8 +64,7 @@ class Clock(object):
|
|||
current_context = LoggingContext.current_context()
|
||||
|
||||
def wrapped_callback(*args, **kwargs):
|
||||
with PreserveLoggingContext():
|
||||
LoggingContext.thread_local.current_context = current_context
|
||||
with PreserveLoggingContext(current_context):
|
||||
callback(*args, **kwargs)
|
||||
|
||||
with PreserveLoggingContext():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue