Add remaining linkkf core files

This commit is contained in:
2026-04-01 11:35:47 +09:00
parent 9cf316fe29
commit 6c8cdf9f07
+17
View File
@@ -0,0 +1,17 @@
import time
import logging
from functools import wraps
logger = logging.getLogger("linkkf")
def linkkf_async_timeit(func):
@wraps(func)
async def wrapper(*args, **kwargs):
start_time = time.perf_counter()
try:
return await func(*args, **kwargs)
finally:
total_time = time.perf_counter() - start_time
logger.debug("%s%r %r took %.4fs", func.__name__, args, kwargs, total_time)
return wrapper