{% macro bars(data, title, unit='') %}
{{ title }} {{ unit }}
{% for row in data.rows %}
{{ row.label }}{{ '%.6g'|format(row.value) }}
{% else %}

No recorded measurements.

{% endfor %} {% if data.omitted %}Top {{ data.rows|length }} shown; {{ data.omitted }} more in the tables.{% endif %}
{% endmacro %} {% macro trend(data, title, unit='') %}
{{ title }} {{ unit }}
{% if data.rows %} {% for row in data.rows %}{{ row.label }}: {{ '%.6g'|format(row.value) }} {{ unit }}{% endfor %} {{ data.rows[0].label }}{{ data.rows[-1].label }}
Chart data{% for row in data.rows %}{% endfor %}
Date{{ unit }}
{{ row.label }}{{ '%.6g'|format(row.value) }}
{% if data.omitted %}{{ data.omitted }} dates omitted from chart; use the date filter or JSON export.{% endif %} {% else %}

No recorded measurements.

{% endif %}
{% endmacro %} {% macro donut(data, title) %}
{{ title }} Approximate tokens
{% if data.total %}
{% for row in data.rows %}{{ row.label }}: {{ row.share|round(1) }}%{% endfor %}
{% else %}

No attributed memory measurements.

{% endif %}
{% endmacro %} {% macro usage_table(rows, title, links=false) %}
{{ title }}
{% for row in rows[:200] %}{% else %}{% endfor %}
ScopeCallsRecorded tokensKnown charge (USD)Priced / callsMean / p95 latency (ms)
{% if row.trace_url %}{{ row.label }}{% else %}{{ row.label }}{% endif %} {{ row.calls }}{{ row.total_tokens }}{% if row.unknown_usage_calls %} ยท {{ row.unknown_usage_calls }} unknown{% endif %} {{ '$%.6f'|format(row.cost_usd|float) if row.cost_usd is not none else 'Unknown' }}{{ row.priced_calls }} / {{ row.calls }} {{ '%.1f / %.1f'|format(row.mean_latency_ms, row.p95_latency_ms) if row.mean_latency_ms is not none else 'Unknown' }}
No recorded calls in this window.
{% if rows|length > 200 %}

First 200 rows shown. Use filters or JSON export for the full bounded window.

{% endif %}
{% endmacro %}