Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
apachedex
Commits
62fe25b6
Commit
62fe25b6
authored
Sep 05, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
__init__.py: show apachedex for renderjs based web site
parent
943a005d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
apachedex/__init__.py
apachedex/__init__.py
+19
-1
No files found.
apachedex/__init__.py
View file @
62fe25b6
...
...
@@ -52,6 +52,13 @@ import shlex
import
sys
import
time
import
traceback
try
:
from
urllib.parse
import
urlparse
from
urllib.parse
import
parse_qs
except
ImportError
:
from
urlparse
import
urlparse
from
urlparse
import
parse_qs
try
:
import
pytz
except
ImportError
:
...
...
@@ -400,7 +407,10 @@ class GenericSiteStats(object):
else
:
url
=
url_match
.
group
(
'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
)
else
:
self
.
url_apdex
[
url
.
split
(
'?'
,
1
)[
0
]].
accumulate
(
match
)
status
=
match
.
group
(
'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
)
self
.
site_search
[
value_date
].
accumulate
(
match
)
elif
split
and
split
[
-
1
].
endswith
(
'ERP5Document_getHateoas'
):
super
(
ERP5SiteStats
,
self
).
accumulate
(
match
,
url_match
,
value_date
)
#mode=traverse&relative_url=web_page_module%2F14351&view=view
split
=
self
.
suffix
(
url_match
.
group
(
'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
:
self
.
no_module
[
split
[
0
]][
value_date
].
accumulate
(
match
)
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment