Commit 1db80242 authored by Vincent Pelletier's avatar Vincent Pelletier

Display parsing time in human-readable format.

parent 56244672
...@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment