[llvm-commits] [zorg] r147462 - /zorg/trunk/lnt/lnt/server/reporting/runs.py
Daniel Dunbar
daniel at zuster.org
Tue Jan 3 11:10:12 PST 2012
Author: ddunbar
Date: Tue Jan 3 13:10:12 2012
New Revision: 147462
URL: http://llvm.org/viewvc/llvm-project?rev=147462&view=rev
Log:
[lnt/v0.4] lnt.server.reporting: Add report time to reports.
Modified:
zorg/trunk/lnt/lnt/server/reporting/runs.py
Modified: zorg/trunk/lnt/lnt/server/reporting/runs.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/reporting/runs.py?rev=147462&r1=147461&r2=147462&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/reporting/runs.py (original)
+++ zorg/trunk/lnt/lnt/server/reporting/runs.py Tue Jan 3 13:10:12 2012
@@ -4,6 +4,7 @@
import StringIO
import os
+import time
import urllib
import lnt.server.reporting.analysis
@@ -22,6 +23,8 @@
assert num_comparison_runs > 0
+ start_time = time.time()
+
ts = run.testsuite
machine = run.machine
machine_parameters = machine.parameters
@@ -220,9 +223,15 @@
<h3>Changes Detail</h3>"""
for field,field_results in test_results:
- _add_report_changes_detail(field, field_results, report,
+ _add_report_changes_detail(ts, field, field_results, report,
html_report, report_url)
+ report_time = time.time() - start_time
+ print >>report, "Report Time: %.2fs" % (report_time,)
+ print >>html_report, """
+<hr>
+<b>Report Time<b>: %.2fs""" % (report_time,)
+
# Finish up the HTML report (wrapping the body, if necessary).
html_report = html_report.getvalue()
if not only_html_body:
@@ -248,8 +257,9 @@
return subject, report.getvalue(), html_report
-def _add_report_changes_detail(field, field_results, report, html_report,
+def _add_report_changes_detail(ts, field, field_results, report, html_report,
report_url):
+ field_index = ts.sample_fields.index(field)
field_display_name = { "compile_time" : "Compile Time",
"execution_time" : "Execution Time" }.get(field.name)
for bucket_name,bucket,show_perf in field_results:
@@ -291,7 +301,8 @@
cr.previous, cr.current, stddev_value)
# Link the regression to the chart of its performance.
- form_data = urllib.urlencode([('test.%d' % test_id, 'on')])
+ form_data = urllib.urlencode([('test.%d' % test_id,
+ str(field_index))])
linked_name = '<a href="%s?%s">%s</a>' % (
os.path.join(report_url, "graph"),
form_data, name)
More information about the llvm-commits
mailing list