From fe7a87b73c2cbcceb101f3a78b16459e703cd6b7 Mon Sep 17 00:00:00 2001 From: Nauman_Ahad Date: Tue, 26 Jan 2016 21:07:03 +0500 Subject: Report Generation for QTIP Creates a PDF file for QTIP, along with a graph of results Change-Id: Iac66bf53cf8c41554d38e3a9d6cdfec236cff3ec Signed-off-by: Nauman_Ahad --- data/report/Qtip_Report.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 data/report/Qtip_Report.py (limited to 'data/report/Qtip_Report.py') diff --git a/data/report/Qtip_Report.py b/data/report/Qtip_Report.py new file mode 100644 index 00000000..e8b52c1a --- /dev/null +++ b/data/report/Qtip_Report.py @@ -0,0 +1,48 @@ +from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image +from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle +from reportlab.lib.units import inch +from reportlab.lib.pagesizes import letter +import qtip_graph as graph +import get_indices as results +doc = SimpleDocTemplate("../../results/QTIP_results.pdf",pagesize=letter, + rightMargin=72,leftMargin=72, + topMargin=72,bottomMargin=18) + +Stor=[] +Style=getSampleStyleSheet() +Title="QTIP Benchmark Suite" +Stor.append(Paragraph(Title,Style['Title'])) +H1="Results" +Stor.append(Spacer(0,36)) +Stor.append(Paragraph(H1, Style['h2'])) +compute=0 +storage=0 +network=0 +try: + compute=results.get_index('compute_result') +except IOError: + pass + +try: + storage=results.get_index('storage_result') +except IOError: + pass +try: + network=results.get_index('network_result') +except IOError: + pass + +Stor.append(Paragraph("Compute Suite: %f" %compute, Style['h5'])) +Stor.append(Paragraph("Storage Suite: %f" %storage, Style['h5'])) +Stor.append(Paragraph("Netowrk Suite: %f" %network, Style['h5'])) +graph.plot_indices(compute,storage,network) +qtip_graph=('qtip_graph.jpeg') +im=Image(qtip_graph, 5*inch,4*inch) +Stor.append(im) +Stor.append(Spacer(0, 12)) +ptext="For Details of the Reference POD hardware, please visit: https://wiki.opnfv.org/reference_pod_hardware_details" +Stor.append(Paragraph(ptext,Style['Normal'])) +Stor.append(Spacer(0, 12)) +ptext="For Details of the Reference POD Results, please visit: https://wiki.opnfv.org/reference_pod_qtip_results" +Stor.append(Paragraph(ptext,Style['Normal'])) +doc.build(Stor) -- cgit 1.2.3-korg