refactor: rename server to llm_server for clarity

This commit is contained in:
martin legrand
2025-04-16 20:29:46 +02:00
parent 77d6e23c45
commit 023c183e85
9 changed files with 298 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
def timer_decorator(func):
"""
Decorator to measure the execution time of a function.
Usage:
@timer_decorator
def my_function():
# code to execute
"""
from time import time
def wrapper(*args, **kwargs):
start_time = time()
result = func(*args, **kwargs)
end_time = time()
print(f"\n{func.__name__} took {end_time - start_time:.2f} seconds to execute\n")
return result
return wrapper