{% extends 'profiler/base.html' %}
{% block content %}
{% for k,v in queries.items %}
<table class="table table-striped sortable">
  <thead>
    <tr>
      <th>Query</th>
      <th class="num">Times ran</th>
      <th class="num">Total time</th>
      <th class="num">Avg time</th>
    </tr>
    <tr>
      <th>{{ k }}</th>
      <th class="num">{{ v.times_ran }}</th>
      <th class="num">{{ v.total_time }}</th>
      <th class="num">{{ v.average_time|floatformat:2 }}</th>
    </tr>      

  </thead>
  <tbody>  
    {% for q in v.queries %}      
    <tr>
      <td class="query-collapse">{{ q.query }}</td>
      <td class="num">{{ q.times_ran }}</td>
      <td class="num">{{ q.total_time }}</td>
      <td class="num">{{ q.average_time|floatformat:2 }}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endfor %}

{% endblock %}
