- # Generate rst table:
- file_name = table[u'output-file'].split(u"/")[-1]
- if u"vpp" in table[u'output-file']:
- path = u"_tmp/src/vpp_performance_tests/comparisons/"
- else:
- path = u"_tmp/src/dpdk_performance_tests/comparisons/"
- rst_file_name = f"{path}{file_name}-txt.rst"
- csv_file_name = f"{path}{file_name}.csv"
- with open(csv_file_name, u"wt", encoding='utf-8') as file_handler:
- file_handler.write(
- u",".join(
- [f'"{itm}"' for itm in header]
- ) + u"\n"
- )
- for test in tbl_final:
- file_handler.write(
- u",".join(
- [f'"{itm}"' for itm in test]
- ) + u"\n"
- )
-
- convert_csv_to_pretty_txt(csv_file_name, rst_file_name, delimiter=u",")
-
- legend = u"\nLegend:\n"
- for idx, rca in enumerate(rcas):
- try:
- desc = (
- f"Diff({cols[comparisons[idx][u'reference'] - 1][u'title']},"
- f"{cols[comparisons[idx][u'compare'] - 1][u'title']})\n"
- )
- except (KeyError, IndexError):
- desc = u"\n"
- legend += f"{rca[u'title']}: Root Cause Analysis for {desc}"
- legend += (
- u"First part of the result is a mean value [Mpps].\n"
- f"Second part of the result following '\u00B1' is a standard "
- u"deviation [Mpps].\n"
- u"First part of Diff is a relative change of mean values [%].\n"
- f"Second part of Diff following '\u00B1' is a standard deviation "
- u"of the Diff [percentual points].\n"
- u"NT: Not tested.\n"
- )
-
- footnote = u""
- for rca in rcas:
- footnote += f"\n{rca[u'title']}:\n"
- footnote += rca[u"data"].get(u"footnote", u"")
-