equal
deleted
inserted
replaced
96 repo = req.vreg.config.repository(None) |
96 repo = req.vreg.config.repository(None) |
97 w(u'<h2>%s</h2>' % _('Repository')) |
97 w(u'<h2>%s</h2>' % _('Repository')) |
98 w(u'<h3>%s</h3>' % _('resources usage')) |
98 w(u'<h3>%s</h3>' % _('resources usage')) |
99 w(u'<table>') |
99 w(u'<table>') |
100 stats = self._cw.call_service('repo_stats') |
100 stats = self._cw.call_service('repo_stats') |
|
101 stats['looping_tasks'] = ', '.join('%s (%s seconds)' % (n, i) for n, i in stats['looping_tasks']) |
|
102 stats['threads'] = ', '.join(sorted(stats['threads'])) |
|
103 for k in stats: |
|
104 if k in ('extid_cache_size', 'type_source_cache_size'): |
|
105 continue |
|
106 if k.endswith('_cache_size'): |
|
107 stats[k] = '%s / %s' % (stats[k]['size'], stats[k]['maxsize']) |
101 for element in sorted(stats): |
108 for element in sorted(stats): |
102 w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>' |
109 w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>' |
103 % (element, xml_escape(unicode(stats[element])), |
110 % (element, xml_escape(unicode(stats[element])), |
104 element.endswith('percent') and '%' or '' )) |
111 element.endswith('percent') and '%' or '' )) |
105 w(u'</table>') |
112 w(u'</table>') |