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()
|
state = ctx.get()
|
||||||
if not state.is_tracking_metrics:
|
if not state.is_tracking_metrics:
|
||||||
return func(*args, **kwargs)
|
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([])
|
state.stack.append([])
|
||||||
start = time.perf_counter()
|
start = time.perf_counter()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue