From 12fdf7ea605d3716d6c9127e22a63bcc345d55be Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 7 Apr 2012 02:26:43 +0200 Subject: Updated cache panel to handle multiple backends and look more like the SQL panel. This is based mostly on the awesome work by @diox done in 9aa062bb6c4318aa81c202003ea902249c0071d1. Closes #134. --- .../templates/debug_toolbar/panels/cache.html | 87 ++++++++++++---------- .../templates/debug_toolbar/panels/sql.html | 2 +- 2 files changed, 50 insertions(+), 39 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/cache.html b/debug_toolbar/templates/debug_toolbar/panels/cache.html index 8104d99..889177a 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/cache.html +++ b/debug_toolbar/templates/debug_toolbar/panels/cache.html @@ -1,58 +1,69 @@ {% load i18n %} +

{% trans "Summary" %}

- - - - - - - - - - + - - - - - - + + + + + + + + + + + + +
{% trans "Total Calls" %}{{ cache_calls }} {% trans "Total Time" %}{{ cache_time }}ms{% trans "Hits" %}{{ cache.hits }}{% trans "Misses" %}{{ cache.misses }}{% trans "Cache Hits" %}{% trans "Cache Misses" %}
{{ total_calls }}{{ total_time }} ms{{ hits }}{{ misses }}
+

{% trans "Commands" %}

+ + + + {% for name in counts.iterkeys %} + + {% endfor %} + + - - - - - - - - + {% for value in counts.itervalues %} + + {% endfor %} +
{{ name }}
gets{{ cache.gets }}sets{{ cache.sets }}deletes{{ cache.deletes }}get_many{{ cache.get_manys }}{{ value }}
-{% if cache.calls %} -

{% trans "Breakdown" %}

+{% if calls %} +

{% trans "Calls" %}

- + - + - {% for call_time, call_type, call_args, call_kwargs, call_func in cache.calls %} - - - - - - - - {% endfor %} + {% for call in calls %} + + + + + + + + + + + + + {% endfor %}
{% trans "Time" %} (ms){% trans "Time (ms)" %} {% trans "Type" %}{% trans "Function" %} {% trans "args" %} {% trans "kwargs" %}{% trans "Backend" %}
{{ call_time|floatformat:"4" }}{{ call_type|escape }}{{ call_func.2|escape }}: {{ call_func.3.0|escape }}{{ call_args|escape }}{{ call_kwargs|escape }}
+ + + {{ call.time|floatformat:"4" }}{{ call.name|escape }}{{ call.args|escape }}{{ call.kwargs|escape }}{{ call.backend }}
{{ call.trace }}
-{% endif %} +{% endif %} \ No newline at end of file diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 96c3072..9ba5b7d 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -27,7 +27,7 @@   - + + +
-- cgit v1.2.3