(request: Request, call_next)
| 7 | |
| 8 | @app.middleware("http") |
| 9 | async def add_process_time_header(request: Request, call_next): |
| 10 | start_time = time.perf_counter() |
| 11 | response = await call_next(request) |
| 12 | process_time = time.perf_counter() - start_time |
| 13 | response.headers["X-Process-Time"] = str(process_time) |
| 14 | return response |
nothing calls this directly
no test coverage detected
searching dependent graphs…