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
e3b994e9
Commit
e3b994e9
authored
Apr 08, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate an HTML index when there is more than one section.
parent
80244895
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
apachedex/__init__.py
apachedex/__init__.py
+16
-5
No files found.
apachedex/__init__.py
View file @
e3b994e9
...
@@ -828,8 +828,19 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
...
@@ -828,8 +828,19 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
else
:
else
:
out
.
write
(
'<script type="text/javascript" src="%s/%s"></script>'
%
(
out
.
write
(
'<script type="text/javascript" src="%s/%s"></script>'
%
(
js_path
,
script
))
js_path
,
script
))
out
.
write
(
'</head><body><h1>Overall</h1><h2>Parameters</h2>'
out
.
write
(
'</head><body><h1>Overall</h1>'
)
'<table class="stats">'
)
if
len
(
per_site
)
>
1
:
out
.
write
(
'<h2>Index</h2><ol>'
)
site_list
=
list
(
enumerate
(
sorted
(
per_site
.
iteritems
(),
key
=
lambda
x
:
site_caption_dict
[
x
[
0
]])))
html_site_caption_dict
=
{}
for
i
,
(
site_id
,
_
)
in
site_list
:
html_caption
=
unquoteToHtml
(
site_caption_dict
[
site_id
],
encoding
)
html_site_caption_dict
[
site_id
]
=
html_caption
out
.
write
(
'<li><a href="#%s" title="%s">%s</a></li>'
%
(
i
,
escape
(
repr
(
site_id
),
quote
=
True
),
html_caption
))
out
.
write
(
'</ol>'
)
out
.
write
(
'<h2>Parameters</h2><table class="stats">'
)
for
caption
,
value
in
(
for
caption
,
value
in
(
(
'apdex threshold'
,
'%.2fs'
%
args
.
apdex
),
(
'apdex threshold'
,
'%.2fs'
%
args
.
apdex
),
(
'period'
,
args
.
period
or
(
period
+
' (auto)'
)),
(
'period'
,
args
.
period
or
(
period
+
' (auto)'
)),
...
@@ -845,9 +856,9 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
...
@@ -845,9 +856,9 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
for
date
,
hit
in
sorted
(
hit_per_day
.
iteritems
(),
key
=
ITEMGETTER0
):
for
date
,
hit
in
sorted
(
hit_per_day
.
iteritems
(),
key
=
ITEMGETTER0
):
out
.
write
(
'<tr><td>%s</td><td>%s</td></tr>'
%
(
date
,
hit
))
out
.
write
(
'<tr><td>%s</td><td>%s</td></tr>'
%
(
date
,
hit
))
out
.
write
(
'</table>'
)
out
.
write
(
'</table>'
)
for
site_id
,
data
in
sorted
(
per_site
.
iteritems
(),
key
=
ITEMGETTER0
)
:
for
i
,
(
site_id
,
data
)
in
site_list
:
out
.
write
(
'<h1
>Site: %s</h1>'
%
unquoteToHtml
(
site_caption_dict
.
get
(
out
.
write
(
'<h1
id="%s" title="%s">%s</h1>'
%
(
i
,
escape
(
repr
(
site_id
),
site_id
,
site_id
),
encoding
))
quote
=
True
),
html_site_caption_dict
[
site_id
]
))
apdex_data
=
data
.
getApdexData
()
apdex_data
=
data
.
getApdexData
()
if
apdex_data
:
if
apdex_data
:
out
.
write
(
out
.
write
(
...
...
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