Commit f66076b3 authored by Vincent Pelletier's avatar Vincent Pelletier

Move hottest pages higher in the report.

They are more concise than hits per error code when details error is
requested.
parent 88f4ef91
......@@ -189,7 +189,15 @@ class GenericSiteStats(object):
append(APDEX_TABLE_HEADERS)
append('</tr><tr>')
append(getApdexStatsAsHtml(apdex, self.threshold))
append('</tr></table>')
append('</tr></table><h2>Hottest pages</h2><table class="stats"><tr>')
append(APDEX_TABLE_HEADERS)
append('<th>url</th></tr>')
for url, data in sorted(self.url_apdex.iteritems(), key=lambda x: x[1].getAverage() * x[1].hit,
reverse=True)[:N_SLOWEST]:
append('<tr>')
append(getApdexStatsAsHtml(data, self.threshold))
append('<td class="text">%s</td></tr>' % escape(url))
append('</table>')
column_set = set()
filtered_status = defaultdict(partial(defaultdict, int))
for status, date_dict in self.status.iteritems():
......@@ -242,15 +250,6 @@ class GenericSiteStats(object):
))
append('</tr>')
append('</table>')
append('<h2>Hottest pages</h2><table class="stats"><tr>')
append(APDEX_TABLE_HEADERS)
append('<th>url</th></tr>')
for url, data in sorted(self.url_apdex.iteritems(), key=lambda x: x[1].getAverage() * x[1].hit,
reverse=True)[:N_SLOWEST]:
append('<tr>')
append(getApdexStatsAsHtml(data, self.threshold))
append('<td class="text">%s</td></tr>' % escape(url))
append('</table>')
return '\n'.join(result)
class ERP5SiteStats(GenericSiteStats):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment