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
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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):
...
@@ -91,16 +91,26 @@ def getApdexStatsAsHtml(data, threshold):
apdex
=
data
.
getApdex
()
apdex
=
data
.
getApdex
()
average
=
data
.
getAverage
()
average
=
data
.
getAverage
()
maximum
=
data
.
getMax
()
maximum
=
data
.
getMax
()
return
'<td style="%s">%i%%</td>'
\
hit
=
data
.
hit
'<td>%s</td><td class="%s">%.2f</td><td class="%s">%.2f</td>'
%
(
if
hit
:
getApdexStyle
(
apdex
),
extra_class
=
''
apdex
*
100
,
apdex_style
=
getApdexStyle
(
apdex
)
data
.
hit
,
else
:
getClassForDuration
(
average
,
threshold
),
extra_class
=
'no_hit'
average
,
apdex_style
=
''
getClassForDuration
(
maximum
,
threshold
),
return
'<td style="%(apdex_style)s" class="%(extra_class)s">%(apdex)i%%'
\
maximum
,
'</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_TABLE_HEADERS
=
''
.
join
(
'<th>'
+
x
+
'</th>'
for
x
in
(
'apdex'
,
'hits'
,
'avg (s)'
,
'max (s)'
))
'apdex'
,
'hits'
,
'avg (s)'
,
'max (s)'
))
...
@@ -604,6 +614,7 @@ def main():
...
@@ -604,6 +614,7 @@ def main():
'.stats th { text-align: center; } '
'.stats th { text-align: center; } '
'.stats td { text-align: right; } '
'.stats td { text-align: right; } '
'.stats th.text, .stats td.text { text-align: left; } '
'.stats th.text, .stats td.text { text-align: left; } '
'.stats td.no_hit { color: #ccc; } '
'table.stats { border-collapse: collapse; } '
'table.stats { border-collapse: collapse; } '
'.problem { background-color: #f00; color: white; } '
'.problem { background-color: #f00; color: white; } '
'.warning { background-color: #f80; 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