Commit abeea628 authored by novelailab's avatar novelailab

fix timer

parent 37445892
......@@ -89,7 +89,7 @@ def generate(request: GenerationRequest):
async def handle_logging_and_errors(request: Request, call_next):
t = time.perf_counter()
response = await call_next(request)
process_time = time.time() - t
process_time = time.perf_counter() - t
response.headers["X-Process-Time"] = str(process_time)
logger.info(f"Request took {t:.3f} seconds")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment