{# Audit cost-summary cards - vendored from governor_web/templates/dashboard/_cost_summary.html @ 19455c57c5a9. Total / Build / Consumption / Flagged / Bytes / Slot in a single row of six on wide screens. The ui-stat-grid-6 token (defined in layout.html) owns the 1/2/3/6 responsive column ramp and the gap-3 rhythm, so no per-page grid utilities or inline media query needed. #} {% from "components/_stat_card.html" import stat_card %} {# Spec 162: on reservation projects cost is ranked by slot-time, not on-demand bytes. Make that basis explicit so the operator reads the numbers correctly. #} {% if totals.cost_basis == 'slot_time' %}
Slot-time priced Reservation project detected - Total Spend and cost drivers are ranked by slot-time (your committed-capacity cost driver), not on-demand bytes. See methodology.
{% endif %}
{{ stat_card( "Total Spend", totals.total_cost_usd | format_usd, meta="across " ~ "{:,}".format(totals.total_jobs) ~ " job" ~ ("s" if totals.total_jobs != 1 else "") ) }} {{ stat_card( "Build Spend", totals.build_spend | format_usd, meta=(("%.0f" | format(totals.build_spend / totals.total_cost_usd * 100)) ~ "% of scanned spend") if (totals.total_cost_usd and totals.build_spend) else "materialising writes", accent="brand", tooltip='Spend on jobs classified as build - queries that materialise data (CTAS, MERGE, INSERT, UPDATE, DELETE). These are your warehouse build costs.' ) }} {{ stat_card( "Consumption Spend", totals.consumption_spend | format_usd, meta=(("%.0f" | format(totals.consumption_spend / totals.total_cost_usd * 100)) ~ "% of scanned spend") if (totals.total_cost_usd and totals.consumption_spend) else "read-only consumers", accent="teal", tooltip='Spend on jobs classified as consumption - read-only queries from BI tools, ad-hoc analysts, reverse-ETL exports, and other consumers. These read your warehouse without writing to it.' ) }} {{ stat_card( "Flagged Jobs", "{:,}".format(pagination.total_items if pagination else 0), meta=("of " ~ "{:,}".format(totals.total_logical_jobs) ~ " logical jobs (" ~ ("%.0f" | format(pagination.total_items / totals.total_logical_jobs * 100)) ~ "%)") if (totals.total_logical_jobs and pagination and pagination.total_items) else "logical jobs with at least one finding", accent="amber", tooltip="Number of logical jobs (aggregated by destination_table for builds, by normalized query hash for consumption) where at least one execution fired an issue or suggestion rule, out of the TOTAL number of logical jobs in the scan. NOT a count of raw executions - one logical job typically aggregates many runs. Each row of the cost-drivers table below is one of these flagged logical jobs." ) }} {{ stat_card( "Bytes Scanned", totals.total_bytes_processed | format_bytes, meta="processed across " ~ "{:,}".format(totals.total_jobs) ~ " job" ~ ("s" if totals.total_jobs != 1 else ""), tooltip='Sum of total_bytes_processed across every cached non-failed job (BigQuery generally refunds bytes-billed on failed jobs, so they are excluded here and from every dollar figure on this row). The dollar columns derive from total_bytes_billed, which rounds up per query.' ) }} {{ stat_card( "Slot Time", (("%.1f" | format(totals.total_slot_hours)) ~ " hrs") if totals.total_slot_hours else "-", meta="slot-hours across the scan window", tooltip='Sum of total_slot_ms across every cached non-failed job (failed jobs are excluded so this matches the dollar figures on this row), converted to slot-hours. Slot time is BigQuery'"'"'s measure of compute work - a query with heavy JOINs / window functions can burn slots without scanning many bytes. Useful as a reservation-sizing signal.' ) }}