cubicweb/web/views/debug.py
changeset 11774 51c160677afe
parent 11767 432f87a63057
child 12012 f7ff5217a02f
equal deleted inserted replaced
11773:054a947b5415 11774:51c160677afe
    92         w(u'<h3>%s</h3>' % _('resources usage'))
    92         w(u'<h3>%s</h3>' % _('resources usage'))
    93         stats = self._cw.call_service('repo_stats')
    93         stats = self._cw.call_service('repo_stats')
    94         stats['looping_tasks'] = ', '.join('%s (%s seconds)' % (n, i) for n, i in stats['looping_tasks'])
    94         stats['looping_tasks'] = ', '.join('%s (%s seconds)' % (n, i) for n, i in stats['looping_tasks'])
    95         stats['threads'] = ', '.join(sorted(stats['threads']))
    95         stats['threads'] = ', '.join(sorted(stats['threads']))
    96         for k in stats:
    96         for k in stats:
    97             if k == 'type_extid_cache_size':
    97             if k == 'type_cache_size':
    98                 continue
    98                 continue
    99             if k.endswith('_cache_size'):
    99             if k.endswith('_cache_size'):
   100                 stats[k] = '%s / %s' % (stats[k]['size'], stats[k]['maxsize'])
   100                 stats[k] = '%s / %s' % (stats[k]['size'], stats[k]['maxsize'])
   101         def format_stat(sname, sval):
   101         def format_stat(sname, sval):
   102             return '%s %s' % (xml_escape(text_type(sval)),
   102             return '%s %s' % (xml_escape(text_type(sval)),