Commit 62fe25b6 authored by Xiaowu Zhang's avatar Xiaowu Zhang show apachedex for renderjs based web site

parent 943a005d
......@@ -52,6 +52,13 @@ import shlex
import sys
import time
import traceback
from urllib.parse import urlparse
from urllib.parse import parse_qs
except ImportError:
from urlparse import urlparse
from urlparse import parse_qs
import pytz
except ImportError:
......@@ -400,7 +407,10 @@ class GenericSiteStats(object):
url ='url')
# XXX: can eat memory if there are many different urls
self.url_apdex[url.split('?', 1)[0]].accumulate(match)
if url.split('?', 1)[0].endswith('ERP5Document_getHateoas'):
self.url_apdex[url.split('?', 1)[1]].accumulate(match)
self.url_apdex[url.split('?', 1)[0]].accumulate(match)
status ='status')
self.status[status][value_date] += 1
if self.error_detail and statusIsError(status):
......@@ -623,6 +633,14 @@ class ERP5SiteStats(GenericSiteStats):
elif split and split[0] == 'ERP5Site_viewSearchResult':
super(ERP5SiteStats, self).accumulate(match, url_match, value_date)
elif split and split[-1].endswith('ERP5Document_getHateoas'):
super(ERP5SiteStats, self).accumulate(match, url_match, value_date)
split = self.suffix('url')).split('?', 1)[1]
parsed_url = urlparse("https://dummy?%s" % split)
related_url = parse_qs(parsed_url.query)['relative_url'][0]
module = related_url.split('/')[0]
self.module[module][not related_url.endswith('module')][value_date].accumulate(match)
elif split and self.expand_other:
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