mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 05:54:47 -04:00
add some metrics on the federation sender (#6160)
This commit is contained in:
parent
6018bec919
commit
66537e10ce
5 changed files with 44 additions and 19 deletions
|
@ -60,12 +60,14 @@ in_flight = InFlightGauge(
|
|||
)
|
||||
|
||||
|
||||
def measure_func(name):
|
||||
def measure_func(name=None):
|
||||
def wrapper(func):
|
||||
block_name = func.__name__ if name is None else name
|
||||
|
||||
@wraps(func)
|
||||
@defer.inlineCallbacks
|
||||
def measured_func(self, *args, **kwargs):
|
||||
with Measure(self.clock, name):
|
||||
with Measure(self.clock, block_name):
|
||||
r = yield func(self, *args, **kwargs)
|
||||
return r
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue