{#- The waterfall: each turn's spans on one clock, nested by recorded parent. Rows come from ui/waterfall_view.py; js/trace-waterfall.js adds folding, filters, search, zoom and the detail panel. Without script every row shows, in order, with its bar. -#} {% from '_fmt.html' import count %} {% set wf = trace_waterfall_view %} {% if wf and wf.turns %} {% set any_failed = wf.failed > 0 %}

Waterfall

{{ count(wf.spans) }} span{{ '' if wf.spans == 1 else 's' }}{% if wf.turns|length > 1 %} in {{ wf.turns|length }} turns{% endif %}, nested by recorded parent and placed on the turn's clock. Select a span for its details.

{% if wf.filters|length > 1 or wf.failed %}
{% for filter in wf.filters %}{% endfor %} {% if wf.failed %}{% endif %}
{% endif %} {% if wf.failed %}{% endif %}

{% for turn in wf.turns %} {% set open_turn = turn.failed or turn.selected or selected_root_trace_id or (loop.first and not any_failed) %}
{% if turn.failed %}{{ turn.failed }} failed{% endif %} {{ turn.title }} {% if turn.duration %}{{ turn.duration }} · {% endif %}{{ count(turn.span_count) }} span{{ '' if turn.span_count == 1 else 's' }}{% if turn.started_at %} · started {% endif %}{% if turn.warnings %} · {{ turn.warnings }} with a missing or looping parent{% endif %} {% if turn.breakdown %}
    {% for part in turn.breakdown %}
  • {{ part.label }} {{ part.duration }}
  • {% endfor %}
{% endif %}
Span
{% for row in turn.rows %}
{% if row.children %}{% else %}{% endif %} {{ row.label }} {%- if row.type == 'fold' %}×{{ row.count }}{% endif %} {%- if row.detail %}{{ row.detail }}{% endif %} {%- if row.children and row.type != 'fold' %}{{ row.spans - 1 }}{% endif %} {%- if row.failed %}Failed{% endif %} {%- if row.warning %}!{% endif %}
{% if row.shape == 'untimed' %}No time recorded {% else %} {% if row.duration or row.shape == 'open' %}{{ row.duration or 'no end recorded' }}{% endif %} {% for mark in row.marks %}{% endfor %} {% endif %}
{% endfor %}
{% endfor %}
{% endif %}