web/views/debug.py
changeset 10309 35bf741203d6
parent 9671 a16fcf064323
child 10311 4e9dcca71fad
--- a/web/views/debug.py	Wed Apr 22 11:00:50 2015 +0200
+++ b/web/views/debug.py	Tue Feb 10 12:18:38 2015 +0100
@@ -98,6 +98,13 @@
         w(u'<h3>%s</h3>' % _('resources usage'))
         w(u'<table>')
         stats = self._cw.call_service('repo_stats')
+        stats['looping_tasks'] = ', '.join('%s (%s seconds)' % (n, i) for n, i in stats['looping_tasks'])
+        stats['threads'] = ', '.join(sorted(stats['threads']))
+        for k in stats:
+            if k in ('extid_cache_size', 'type_source_cache_size'):
+                continue
+            if k.endswith('_cache_size'):
+                stats[k] = '%s / %s' % (stats[k]['size'], stats[k]['maxsize'])
         for element in sorted(stats):
             w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>'
                    % (element, xml_escape(unicode(stats[element])),