Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cache.html 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {% load i18n %}
  2. <h4>{% trans "Summary" %}</h4>
  3. <table>
  4. <thead>
  5. <tr>
  6. <th>{% trans "Total calls" %}</th>
  7. <th>{% trans "Total time" %}</th>
  8. <th>{% trans "Cache hits" %}</th>
  9. <th>{% trans "Cache misses" %}</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. <tr>
  14. <td>{{ total_calls }}</td>
  15. <td>{{ total_time }} ms</td>
  16. <td>{{ hits }}</td>
  17. <td>{{ misses }}</td>
  18. </tr>
  19. </tbody>
  20. </table>
  21. <h4>{% trans "Commands" %}</h4>
  22. <table>
  23. <thead>
  24. <tr>
  25. {% for name in counts.keys %}
  26. <th>{{ name }}</th>
  27. {% endfor %}
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <tr>
  32. {% for value in counts.values %}
  33. <td>{{ value }}</td>
  34. {% endfor %}
  35. </tr>
  36. </tbody>
  37. </table>
  38. {% if calls %}
  39. <h4>{% trans "Calls" %}</h4>
  40. <table>
  41. <thead>
  42. <tr>
  43. <th colspan="2">{% trans "Time (ms)" %}</th>
  44. <th>{% trans "Type" %}</th>
  45. <th>{% trans "Arguments" %}</th>
  46. <th>{% trans "Keyword arguments" %}</th>
  47. <th>{% trans "Backend" %}</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. {% for call in calls %}
  52. <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}" id="cacheMain_{{ forloop.counter }}">
  53. <td class="djdt-toggle">
  54. <a class="djToggleSwitch" data-toggle-name="cacheMain" data-toggle-id="{{ forloop.counter }}" data-toggle-open="+" data-toggle-close="-" href>+</a>
  55. </td>
  56. <td>{{ call.time|floatformat:"4" }}</td>
  57. <td>{{ call.name|escape }}</td>
  58. <td>{{ call.args|escape }}</td>
  59. <td>{{ call.kwargs|escape }}</td>
  60. <td>{{ call.backend }}</td>
  61. </tr>
  62. <tr class="djUnselected {% cycle 'djDebugOdd' 'djDebugEven' %} djToggleDetails_{{ forloop.counter }}" id="cacheDetails_{{ forloop.counter }}">
  63. <td colspan="1"></td>
  64. <td colspan="5"><pre class="djdt-stack">{{ call.trace }}</pre></td>
  65. </tr>
  66. {% endfor %}
  67. </tbody>
  68. </table>
  69. {% endif %}