{% macro render_stats(title, queries, slow_query_limit) %}

{{ title }}

{% if queries %} {% for query in queries %} {% set colspan = 9 %} {% endfor %}
Time (ms) Size Database Collection Command name Operation id Server command Response data Request status
slow_query_limit %}style="color:red;" {% endif %}> {{ query.time|round(3) }} {{ query.size|round(2) }}Kb {{ query.database }} {{ query.collection }} {{ query.command_name }} {{ query.operation_id }} Toggle Toggle {{ query.request_status }}
{{ query.server_command|pprint }}
{{ query.server_response|pprint }}
{% else %}

No {{ title|lower }} recorded

{% endif %} {% endmacro %} {{ render_stats("Queries", queries, slow_query_limit) }}