mirror of
https://github.com/element-hq/synapse
synced 2024-09-19 07:05:15 +00:00
Some cleanup
This commit is contained in:
parent
0f2bfa4224
commit
db04b16060
3 changed files with 6 additions and 3 deletions
|
@ -494,6 +494,10 @@ class FederationHandler:
|
|||
return False
|
||||
|
||||
processing_end_time = self.clock.time_msec()
|
||||
logger.info(
|
||||
"backfill_processing_before_timer asfd=%s",
|
||||
(processing_start_time - processing_end_time) / 1000,
|
||||
)
|
||||
backfill_processing_before_timer.observe(
|
||||
(processing_start_time - processing_end_time) / 1000
|
||||
)
|
||||
|
|
|
@ -910,7 +910,9 @@ def trace_with_opname(
|
|||
def trace(func: Callable[P, R]) -> Callable[P, R]:
|
||||
"""
|
||||
Decorator to trace a function.
|
||||
|
||||
Sets the operation name to that of the function's name.
|
||||
|
||||
See the module's doc string for usage examples.
|
||||
"""
|
||||
return trace_with_opname(func.__name__)(func)
|
||||
|
|
|
@ -263,11 +263,8 @@ class _PerHostRatelimiter:
|
|||
# Ensure that we've properly cleaned up.
|
||||
self.sleeping_requests.discard(request_id)
|
||||
self.ready_request_queue.pop(request_id, None)
|
||||
wait_span_cm.__exit__(None, None, None)
|
||||
return r
|
||||
|
||||
wait_span_cm = start_active_span("ratelimit wait")
|
||||
wait_span_cm.__enter__()
|
||||
ret_defer.addCallbacks(on_start, on_err)
|
||||
ret_defer.addBoth(on_both)
|
||||
return make_deferred_yieldable(ret_defer)
|
||||
|
|
Loading…
Reference in a new issue