forked from LBRYCommunity/lbry-sdk
added errors key to metrics tracking
This commit is contained in:
parent
dd9bf04e35
commit
8e64b1840d
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ def measure(func):
|
|||
state = ctx.get()
|
||||
if not state.is_tracking_metrics:
|
||||
return func(*args, **kwargs)
|
||||
metric = state.metrics.setdefault(func.__name__, {'calls': 0, 'total': 0, 'isolated': 0})
|
||||
metric = state.metrics.setdefault(func.__name__, {
|
||||
'calls': 0, 'total': 0, 'isolated': 0, 'errors': 0
|
||||
})
|
||||
state.stack.append([])
|
||||
start = time.perf_counter()
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue