Log event timing in 1 message, not 2
This commit is contained in:
parent
ae8aeaeef4
commit
8300c84f6a
1 changed files with 2 additions and 4 deletions
|
@ -178,8 +178,6 @@ class EventHook(object):
|
||||||
def _call(self, kwargs: dict, safe: bool, maximum: typing.Optional[int]
|
def _call(self, kwargs: dict, safe: bool, maximum: typing.Optional[int]
|
||||||
) -> typing.List[typing.Any]:
|
) -> typing.List[typing.Any]:
|
||||||
event_path = self._get_path()
|
event_path = self._get_path()
|
||||||
self.log.trace("calling event: \"%s\" (params: %s)",
|
|
||||||
[event_path, kwargs])
|
|
||||||
start = time.monotonic()
|
start = time.monotonic()
|
||||||
|
|
||||||
event = self._make_event(kwargs)
|
event = self._make_event(kwargs)
|
||||||
|
@ -197,8 +195,8 @@ class EventHook(object):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
total_milliseconds = (time.monotonic() - start) * 1000
|
total_milliseconds = (time.monotonic() - start) * 1000
|
||||||
self.log.trace("event \"%s\" called in %fms", [
|
self.log.trace("called event in %fms: \"%s\" (params: %s)",
|
||||||
event_path, total_milliseconds])
|
[total_milliseconds, event_path, kwargs])
|
||||||
|
|
||||||
self.check_purge()
|
self.check_purge()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue