Commit 580a24eb authored by Vincent Pelletier's avatar Vincent Pelletier

Drop stale support for missing duration.

parent 72dab44a
......@@ -133,20 +133,18 @@ class GenericSiteStats(object):
def accumulate(self, match, url_match, date):
self.status[match.group('status')][date] += 1
duration = match.group('duration')
self.apdex[date].accumulate(match)
if duration is not None:
duration = int(duration)
if url_match is None:
url = match.group('request')
else:
url = url_match.group('url')
if duration > self.slowest_list[0][0]:
slowest_list = self.slowest_list
slowest_list.append((duration, match.group('timestamp'), url,
match.group('referer')))
if len(slowest_list) > N_SLOWEST_THRESHOLD:
self._housekeeping()
duration = int(match.group('duration'))
if url_match is None:
url = match.group('request')
else:
url = url_match.group('url')
if duration > self.slowest_list[0][0]:
slowest_list = self.slowest_list
slowest_list.append((duration, match.group('timestamp'), url,
match.group('referer')))
if len(slowest_list) > N_SLOWEST_THRESHOLD:
self._housekeeping()
def _housekeeping(self):
slowest_list = self.slowest_list
......
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