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
Arnaud Fontaine
apachedex
Commits
6a7139b9
Commit
6a7139b9
authored
Apr 07, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5 stats: provide overall module-level and document-level stats.
parent
38a1f27d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
apachedex/__init__.py
apachedex/__init__.py
+15
-1
No files found.
apachedex/__init__.py
View file @
6a7139b9
...
@@ -485,6 +485,8 @@ class ERP5SiteStats(GenericSiteStats):
...
@@ -485,6 +485,8 @@ class ERP5SiteStats(GenericSiteStats):
append
(
'<h2>Stats per module</h2><table class="stats stats_erp5"><tr>'
append
(
'<h2>Stats per module</h2><table class="stats stats_erp5"><tr>'
'<th rowspan="2" colspan="3">module</th>'
'<th rowspan="2" colspan="3">module</th>'
'<th colspan="4" class="overall_right">overall</th>'
)
'<th colspan="4" class="overall_right">overall</th>'
)
module_document_overall
=
defaultdict
(
partial
(
APDEXStats
,
self
.
threshold
,
None
))
filtered_module
=
defaultdict
(
partial
(
defaultdict
,
partial
(
filtered_module
=
defaultdict
(
partial
(
defaultdict
,
partial
(
defaultdict
,
partial
(
APDEXStats
,
self
.
threshold
,
None
))))
defaultdict
,
partial
(
APDEXStats
,
self
.
threshold
,
None
))))
filtered_no_module
=
defaultdict
(
partial
(
APDEXStats
,
self
.
threshold
,
None
))
filtered_no_module
=
defaultdict
(
partial
(
APDEXStats
,
self
.
threshold
,
None
))
...
@@ -495,8 +497,10 @@ class ERP5SiteStats(GenericSiteStats):
...
@@ -495,8 +497,10 @@ class ERP5SiteStats(GenericSiteStats):
filtered_is_document_dict
=
filtered_module
[
key
]
filtered_is_document_dict
=
filtered_module
[
key
]
for
key
,
data_dict
in
is_document_dict
.
iteritems
():
for
key
,
data_dict
in
is_document_dict
.
iteritems
():
filtered_data_dict
=
filtered_is_document_dict
[
key
]
filtered_data_dict
=
filtered_is_document_dict
[
key
]
module_document_apdex
=
module_document_overall
[
key
]
for
date
,
value
in
data_dict
.
iteritems
():
for
date
,
value
in
data_dict
.
iteritems
():
filtered_data_dict
[
stat_filter
(
date
)].
accumulateFrom
(
value
)
filtered_data_dict
[
stat_filter
(
date
)].
accumulateFrom
(
value
)
module_document_apdex
.
accumulateFrom
(
value
)
column_set
.
update
(
filtered_data_dict
)
column_set
.
update
(
filtered_data_dict
)
column_list
=
sorted
(
column_set
)
column_list
=
sorted
(
column_set
)
for
date
in
column_list
:
for
date
in
column_list
:
...
@@ -512,6 +516,7 @@ class ERP5SiteStats(GenericSiteStats):
...
@@ -512,6 +516,7 @@ class ERP5SiteStats(GenericSiteStats):
append
(
data_total
.
asHTML
(
self
.
threshold
,
True
))
append
(
data_total
.
asHTML
(
self
.
threshold
,
True
))
for
date
in
column_list
:
for
date
in
column_list
:
append
(
data_dict
[
date
].
asHTML
(
self
.
threshold
))
append
(
data_dict
[
date
].
asHTML
(
self
.
threshold
))
return
data_total
def
hiddenGraph
(
data_dict
,
title
):
def
hiddenGraph
(
data_dict
,
title
):
append
(
'<td class="text group_right hidden_graph">'
)
append
(
'<td class="text group_right hidden_graph">'
)
data
=
getDataPoints
(
data_dict
)
data
=
getDataPoints
(
data_dict
)
...
@@ -541,7 +546,16 @@ class ERP5SiteStats(GenericSiteStats):
...
@@ -541,7 +546,16 @@ class ERP5SiteStats(GenericSiteStats):
append
(
'</tr>'
)
append
(
'</tr>'
)
append
(
'<tr class="group_top group_bottom"><th colspan="2">(none)</th>'
)
append
(
'<tr class="group_top group_bottom"><th colspan="2">(none)</th>'
)
hiddenGraph
(
self
.
no_module
,
'(none)'
)
hiddenGraph
(
self
.
no_module
,
'(none)'
)
apdexAsColumns
(
filtered_no_module
)
no_module_overall
=
apdexAsColumns
(
filtered_no_module
)
append
(
'</tr></table><h2>Per-level overall</h2><table class="stats"><tr>'
'<th>level</th>'
)
append
(
APDEXStats
.
asHTMLHeader
())
append
(
'</tr><tr><th>top</th>'
)
append
(
no_module_overall
.
asHTML
(
self
.
threshold
))
append
(
'</tr><tr><th>module</th>'
)
append
(
module_document_overall
[
False
].
asHTML
(
self
.
threshold
))
append
(
'</tr><tr><th>document</th>'
)
append
(
module_document_overall
[
True
].
asHTML
(
self
.
threshold
))
append
(
'</tr></table>'
)
append
(
'</tr></table>'
)
append
(
super
(
ERP5SiteStats
,
self
).
asHTML
(
date_format
,
append
(
super
(
ERP5SiteStats
,
self
).
asHTML
(
date_format
,
placeholder_delta
,
graph_period
,
encoding
,
stat_filter
=
stat_filter
))
placeholder_delta
,
graph_period
,
encoding
,
stat_filter
=
stat_filter
))
...
...
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