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
Sebastien Robin
apachedex
Commits
1db80242
Commit
1db80242
authored
Apr 05, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display parsing time in human-readable format.
parent
56244672
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
apachedex/__init__.py
apachedex/__init__.py
+4
-2
No files found.
apachedex/__init__.py
View file @
1db80242
...
@@ -698,6 +698,7 @@ def main():
...
@@ -698,6 +698,7 @@ def main():
if
args
.
stats
:
if
args
.
stats
:
out
.
write
(
'<h1>Parsing stats</h1><table class="stats">'
)
out
.
write
(
'<h1>Parsing stats</h1><table class="stats">'
)
buildno
,
builddate
=
platform
.
python_build
()
buildno
,
builddate
=
platform
.
python_build
()
parsing_time
=
end_parsing_time
-
start_time
for
caption
,
value
in
(
for
caption
,
value
in
(
(
'Execution date'
,
datetime
.
now
().
isoformat
()),
(
'Execution date'
,
datetime
.
now
().
isoformat
()),
(
'Interpreter'
,
'%s %s build %s (%s)'
%
(
(
'Interpreter'
,
'%s %s build %s (%s)'
%
(
...
@@ -711,8 +712,9 @@ def main():
...
@@ -711,8 +712,9 @@ def main():
(
'... malformed'
,
malformed_lines
),
(
'... malformed'
,
malformed_lines
),
(
'... URL-less'
,
no_url_lines
),
(
'... URL-less'
,
no_url_lines
),
(
'... skipped'
,
skipped_lines
),
(
'... skipped'
,
skipped_lines
),
(
'Parsing time'
,
'%.2fs'
%
(
end_parsing_time
-
start_time
)),
(
'Parsing time'
,
timedelta
(
seconds
=
parsing_time
)),
(
'Rendering time'
,
'%.2fs'
%
(
end_stat_time
-
end_parsing_time
)),
(
'Rendering time'
,
timedelta
(
seconds
=
(
end_stat_time
-
end_parsing_time
))),
):
):
out
.
write
(
'<tr><th class="text">%s</th><td>%s</td></tr>'
%
(
out
.
write
(
'<tr><th class="text">%s</th><td>%s</td></tr>'
%
(
caption
,
value
))
caption
,
value
))
...
...
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