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
5eb90fec
Commit
5eb90fec
authored
Apr 05, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fade ERP5 stats for cell groups which have no hit.
parent
e804ffc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
apachedex/__init__.py
apachedex/__init__.py
+21
-10
No files found.
apachedex/__init__.py
View file @
5eb90fec
...
...
@@ -91,16 +91,26 @@ def getApdexStatsAsHtml(data, threshold):
apdex
=
data
.
getApdex
()
average
=
data
.
getAverage
()
maximum
=
data
.
getMax
()
return
'<td style="%s">%i%%</td>'
\
'<td>%s</td><td class="%s">%.2f</td><td class="%s">%.2f</td>'
%
(
getApdexStyle
(
apdex
),
apdex
*
100
,
data
.
hit
,
getClassForDuration
(
average
,
threshold
),
average
,
getClassForDuration
(
maximum
,
threshold
),
maximum
,
)
hit
=
data
.
hit
if
hit
:
extra_class
=
''
apdex_style
=
getApdexStyle
(
apdex
)
else
:
extra_class
=
'no_hit'
apdex_style
=
''
return
'<td style="%(apdex_style)s" class="%(extra_class)s">%(apdex)i%%'
\
'</td><td class="%(extra_class)s">%(hit)s</td>'
\
'<td class="%(average_class)s %(extra_class)s">%(average).2f</td>'
\
'<td class="%(max_class)s %(extra_class)s">%(max).2f</td>'
%
{
'extra_class'
:
extra_class
,
'apdex_style'
:
apdex_style
,
'apdex'
:
apdex
*
100
,
'hit'
:
hit
,
'average_class'
:
getClassForDuration
(
average
,
threshold
),
'average'
:
average
,
'max_class'
:
getClassForDuration
(
maximum
,
threshold
),
'max'
:
maximum
,
}
APDEX_TABLE_HEADERS
=
''
.
join
(
'<th>'
+
x
+
'</th>'
for
x
in
(
'apdex'
,
'hits'
,
'avg (s)'
,
'max (s)'
))
...
...
@@ -604,6 +614,7 @@ def main():
'.stats th { text-align: center; } '
'.stats td { text-align: right; } '
'.stats th.text, .stats td.text { text-align: left; } '
'.stats td.no_hit { color: #ccc; } '
'table.stats { border-collapse: collapse; } '
'.problem { background-color: #f00; color: white; } '
'.warning { background-color: #f80; color: white; } '
...
...
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