{#- The Timing panel: the request's phases and moments as spans on its clock, drawn by the spans table the generic panel uses too. -#} {%- from "_spans.html" import table -%} {%- if panel.spans %} {{ table(panel.spans, panel.spans[0].duration_ms, events, "Phase") }} {%- endif %} {#- What held the request up is a table of names and values; the modules loaded on first use are a table of their own, which opens below it. -#} {%- for table in panel.tables %} {%- if table.columns|length == 2 %} {%- for row in table.rows %} {%- endfor %}
{{ table.caption }}
{{ row.cells[0] }}{{ row.cells[1] }}
{%- else %}
{{ table.caption }} {%- for row in table.rows %} {%- endfor %}
{{ table.columns[0] }}{{ table.columns[1] }}{{ table.columns[2] }}{{ table.columns[3] }}
{{ row.cells[0] }}{{ row.cells[1] }}{{ row.cells[2] }}{{ row.cells[3] }}
{%- endif %} {%- endfor %} {%- if not panel.spans %}

No times are known yet.

{%- else %}
What the phases are
request
From the request's arrival at Muru until the last byte of its response was sent.
waiting for a worker
Until a worker was free to take the request.
in the worker
The worker's own account, from receiving the request until the application was done with it.
waiting for a thread
From the worker taking a WSGI request until one of its threads started it.
waiting for the GIL
Each time that thread, or the event loop, waited to run Python for the request, drawn where it happened. The table gives them all, and garbage collections, which pause every thread of the worker.
running the application
From the end of those first waits until the application called start_response, or sent http.response.start.
response started
The moment it did.
producing the body
From the body's first byte to its last.
finishing
Until the body's close() returned, or the ASGI application returned.
importing modules
Each module the request loaded for the first time in this worker, from its import to the end of its code, with the modules it imported in turn inside it. A second request needing the same modules does not load them again. Loading them before the workers start is what preload_modules does.
event loop held
Each stretch during the request in which the worker's event loop did not get to run: it was blocked, by this request or another.
response head at the edge
The moment the response's status and headers came back from the worker.
sending the response
From then until the last byte was sent to the client.
A name in italics
A moment rather than a period, marked by a diamond and a dashed line through every row.
{%- endif %} {%- for value in panel.values %}

The {{ value.name }} {% if value.value == "still to come" %}is still to come.{% else %}{{ value.value }}.{% endif %}

{%- endfor %}