Improve the performance of structured logging (#6322)

This commit is contained in:
Amber Brown 2019-11-26 03:45:50 +11:00 committed by GitHub
parent 78cfc05fc4
commit 9eebd46048
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 92 additions and 29 deletions

View file

@ -379,6 +379,7 @@ class FakeTransport(object):
disconnecting = False
disconnected = False
connected = True
buffer = attr.ib(default=b"")
producer = attr.ib(default=None)
autoflush = attr.ib(default=True)
@ -402,6 +403,7 @@ class FakeTransport(object):
"FakeTransport: Delaying disconnect until buffer is flushed"
)
else:
self.connected = False
self.disconnected = True
def abortConnection(self):