Commit 37b59d04 authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5 stats: exclude "other" from graphs & overall apdex.

Include ERP5Site_viewSearchResult, though.
parent 607cd218
......@@ -487,23 +487,11 @@ class ERP5SiteStats(GenericSiteStats):
len(split) > 1 and (split[1] != 'view' and '_view' not in split[1])
][date].accumulate(match)
elif split and split[0] == 'ERP5Site_viewSearchResult':
super(ERP5SiteStats, self).accumulate(match, url_match, date)
self.site_search[date].accumulate(match)
else:
self.no_module[date].accumulate(match)
def getApdexData(self):
asDict = lambda apdex_data: dict((x, (y, z)) for (x, y, z) in apdex_data)
date_dict = asDict(super(ERP5SiteStats, self).getApdexData())
for date, (apdex, hit) in asDict(getDataPoints(self.no_module)
).iteritems():
super_apdex, super_hit = date_dict.get(date, (100, 0))
new_hit = hit + super_hit
if super_hit:
new_apdex = super_apdex * super_hit / new_hit + apdex * hit / new_hit
date_dict[date] = (new_apdex, new_hit)
return sorted(((date, apdex, hit)
for date, (apdex, hit) in date_dict.iteritems()), key=ITEMGETTER0)
def asHTML(self, date_format, placeholder_delta, graph_period, encoding,
stat_filter=lambda x: x):
result = []
......
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