mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
update to more consistently use seconds in any metrics or logging
This commit is contained in:
parent
5c40ce3777
commit
3ef5cd74a6
4 changed files with 38 additions and 38 deletions
|
@ -96,7 +96,7 @@ def time_function(f):
|
|||
id = _TIME_FUNC_ID
|
||||
_TIME_FUNC_ID += 1
|
||||
|
||||
start = time.clock() * 1000
|
||||
start = time.clock()
|
||||
|
||||
try:
|
||||
_log_debug_as_f(
|
||||
|
@ -107,10 +107,10 @@ def time_function(f):
|
|||
|
||||
r = f(*args, **kwargs)
|
||||
finally:
|
||||
end = time.clock() * 1000
|
||||
end = time.clock()
|
||||
_log_debug_as_f(
|
||||
f,
|
||||
"[FUNC END] {%s-%d} %f",
|
||||
"[FUNC END] {%s-%d} %.3f sec",
|
||||
(func_name, id, end - start,),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue