add_process_time_header() — fastapi Function Reference
Architecture documentation for the add_process_time_header() function in tutorial001_py39.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 77c0b3ae_c2e1_8ff5_0054_13a578727ae6["add_process_time_header()"] 530e41d5_fbce_3a44_52fc_3c92f1d5b0bc["tutorial001_py39.py"] 77c0b3ae_c2e1_8ff5_0054_13a578727ae6 -->|defined in| 530e41d5_fbce_3a44_52fc_3c92f1d5b0bc style 77c0b3ae_c2e1_8ff5_0054_13a578727ae6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs_src/middleware/tutorial001_py39.py lines 9–14
async def add_process_time_header(request: Request, call_next):
start_time = time.perf_counter()
response = await call_next(request)
process_time = time.perf_counter() - start_time
response.headers["X-Process-Time"] = str(process_time)
return response
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does add_process_time_header() do?
add_process_time_header() is a function in the fastapi codebase, defined in docs_src/middleware/tutorial001_py39.py.
Where is add_process_time_header() defined?
add_process_time_header() is defined in docs_src/middleware/tutorial001_py39.py at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free