{# Shared chart controls for the trial and task-comparison pages. Each macro takes `url`, a macro of `(trace filter, chart filter) -> href`, so each page owns its query keys while sharing the chart markup. The numbers arrive already placed in SVG user units from `app/nullius/traces/charts.py`, which computes them in Python because the arithmetic runs on nanosecond magnitudes a JS double cannot hold. #} {# The label filter's chips. Built from the *unfiltered* tree, so a hidden label keeps the chip that brings it back. #} {% macro facet_chips(facets, filt, chart_filter, url) %}
How long one call took{% if c.x_step %}, each mark {{ c.x_step }}× the last{% endif %}
{{ c.note }}
{% endif %}These durations are how long each call lasted, not moments in the run. The {{ charts.summed_ns|nsdur }} they add up to is not wall clock: calls overlap and leave gaps. {{ tail }} {% if charts.note %}{{ charts.note }}{% endif %} {% if chart_filter.active %} Draw every kind again × {% endif %}
| Duration | Spans | Span time | {% if c.columns and c.columns[0].share %}Share | {% endif %}
|---|---|---|---|
| {{ col.lo_ns|nsround }}–{{ col.hi_ns|nsround }} | {{ col.count }} | {{ col.ns|nsdur }} | {% if col.share %}{{ col.share }} | {% endif %}
| No longer than | {% for s in c.series %}{{ s.label }} | {% endfor %}||
| {{ r.ns|nsround }} | {% for row in r.rows %}{{ row.share }} | {% endfor %}
{% if empty_note %}{{ empty_note }} {% elif charts.total %}None of the {{ charts.total }} span{{ '' if charts.total == 1 else 's' }} in this view is a call with a known duration — there is nothing to plot. {% else %}Every span is filtered out — nothing left to plot.{% endif %}
{% endif %}