diff options
author | Tibor Frank <tifrank@cisco.com> | 2017-10-12 12:47:56 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-10-18 14:39:27 +0000 |
commit | 9a89069be33f11879f8307e5b774c6e1e7afa398 (patch) | |
tree | c45f5bf8cd7c3277b6d70c353d03f445a34a9848 | |
parent | 59eb880b002cc73cc6e8834814c2da34b2ddfd54 (diff) |
CSIT-836: PDF format: Improvements in pdf layout
CSIT-837: Scope of pdf version
Change-Id: Idfc9c04274c6635fbef14f87147665d31cfd7352
Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r-- | docs/report/detailed_test_results/index.rst | 21 | ||||
-rw-r--r-- | docs/report/test_configuration/index.rst | 13 | ||||
-rw-r--r-- | docs/report/test_operational_data/index.rst | 10 | ||||
-rw-r--r-- | docs/report/vpp_performance_tests/csit_release_notes.rst | 115 | ||||
-rw-r--r-- | resources/tools/presentation/conf.py | 2 | ||||
-rw-r--r-- | resources/tools/presentation/generator_files.py | 23 | ||||
-rw-r--r-- | resources/tools/presentation/generator_report.py | 2 |
7 files changed, 148 insertions, 38 deletions
diff --git a/docs/report/detailed_test_results/index.rst b/docs/report/detailed_test_results/index.rst index 9a986bcd65..4c89f1f9fb 100644 --- a/docs/report/detailed_test_results/index.rst +++ b/docs/report/detailed_test_results/index.rst @@ -1,11 +1,14 @@ -Detailed Test Results -===================== +.. only:: html -.. toctree:: - vpp_performance_results/index - dpdk_performance_results/index - vpp_functional_results/index - honeycomb_functional_results/index - nshsfc_functional_results/index - vpp_unittest_results/index + Detailed Test Results + ===================== + + .. toctree:: + + vpp_performance_results/index + dpdk_performance_results/index + vpp_functional_results/index + honeycomb_functional_results/index + nshsfc_functional_results/index + vpp_unittest_results/index diff --git a/docs/report/test_configuration/index.rst b/docs/report/test_configuration/index.rst index 908f494082..3963896b82 100644 --- a/docs/report/test_configuration/index.rst +++ b/docs/report/test_configuration/index.rst @@ -1,7 +1,10 @@ -Test Configuration -================== +.. only:: html -.. toctree:: - vpp_performance_configuration/index - vpp_functional_configuration/index + Test Configuration + ================== + + .. toctree:: + + vpp_performance_configuration/index + vpp_functional_configuration/index diff --git a/docs/report/test_operational_data/index.rst b/docs/report/test_operational_data/index.rst index 44e7fb0809..d5eca487c0 100644 --- a/docs/report/test_operational_data/index.rst +++ b/docs/report/test_operational_data/index.rst @@ -1,6 +1,8 @@ -Test Operational Data
-=====================
+.. only:: html
-.. toctree::
+ Test Operational Data
+ =====================
- vpp_performance_operational_data/index
+ .. toctree::
+
+ vpp_performance_operational_data/index
diff --git a/docs/report/vpp_performance_tests/csit_release_notes.rst b/docs/report/vpp_performance_tests/csit_release_notes.rst index 812d5f2bed..8499bca7ff 100644 --- a/docs/report/vpp_performance_tests/csit_release_notes.rst +++ b/docs/report/vpp_performance_tests/csit_release_notes.rst @@ -99,18 +99,64 @@ NDR Throughput Non-Drop Rate Throughput discovery tests:
-.. csv-table::
- :align: center
- :file: performance_improvements/performance_improvements_ndr_top.csv
+.. only:: html
+
+ .. csv-table::
+ :align: center
+ :file: performance_improvements/performance_improvements_ndr_top.csv
+
+.. only:: latex
+
+ .. raw:: latex
+
+ \makeatletter
+ \csvset{
+ perfimprovements column width/.style={after head=\csv@pretable\begin{longtable}{ m{1.5cm} m{5cm} m{#1} m{#1} m{#1} m{#1} m{#1} m{#1}}\csv@tablehead},
+ }
+ \makeatother
+
+ {\tiny
+ \csvautobooklongtable[separator=comma,
+ respect all,
+ no check column count,
+ perfimprovements column width=1cm,
+ late after line={\\\hline},
+ late after last line={\end{longtable}}
+ ]{../_tmp/src/vpp_performance_tests/performance_improvements/performance_improvements_ndr_top.csv}
+ }
+
PDR Throughput
~~~~~~~~~~~~~~
Partial Drop Rate thoughput discovery tests with packet Loss Tolerance of 0.5%:
-.. csv-table::
- :align: center
- :file: performance_improvements/performance_improvements_pdr_top.csv
+.. only:: html
+
+ .. csv-table::
+ :align: center
+ :file: performance_improvements/performance_improvements_pdr_top.csv
+
+.. only:: latex
+
+ .. raw:: latex
+
+ \makeatletter
+ \csvset{
+ perfimprovements column width/.style={after head=\csv@pretable\begin{longtable}{ m{1.5cm} m{5cm} m{#1} m{#1} m{#1} m{#1} m{#1} m{#1}}\csv@tablehead},
+ }
+ \makeatother
+
+ {\tiny
+ \csvautobooklongtable[separator=comma,
+ respect all,
+ no check column count,
+ perfimprovements column width=1cm,
+ late after line={\\\hline},
+ late after last line={\end{longtable}}
+ ]{../_tmp/src/vpp_performance_tests/performance_improvements/performance_improvements_pdr_top.csv}
+ }
+
Measured improvements are in line with VPP code optimizations listed in
`VPP-17.07 release notes
@@ -129,18 +175,63 @@ NDR Throughput Non-Drop Rate Throughput discovery tests:
-.. csv-table::
- :align: center
- :file: performance_improvements/performance_improvements_ndr_low.csv
+.. only:: html
+
+ .. csv-table::
+ :align: center
+ :file: performance_improvements/performance_improvements_ndr_low.csv
+
+.. only:: latex
+
+ .. raw:: latex
+
+ \makeatletter
+ \csvset{
+ perfimprovements column width/.style={after head=\csv@pretable\begin{longtable}{ m{1.5cm} m{5cm} m{#1} m{#1} m{#1} m{#1} m{#1} m{#1}}\csv@tablehead},
+ }
+ \makeatother
+
+ {\tiny
+ \csvautobooklongtable[separator=comma,
+ respect all,
+ no check column count,
+ perfimprovements column width=1cm,
+ late after line={\\\hline},
+ late after last line={\end{longtable}}
+ ]{../_tmp/src/vpp_performance_tests/performance_improvements/performance_improvements_ndr_low.csv}
+ }
+
PDR Throughput
~~~~~~~~~~~~~~
Partial Drop Rate thoughput discovery tests with packet Loss Tolerance of 0.5%:
-.. csv-table::
- :align: center
- :file: performance_improvements/performance_improvements_pdr_low.csv
+.. only:: html
+
+ .. csv-table::
+ :align: center
+ :file: performance_improvements/performance_improvements_pdr_low.csv
+
+.. only:: latex
+
+ .. raw:: latex
+
+ \makeatletter
+ \csvset{
+ perfimprovements column width/.style={after head=\csv@pretable\begin{longtable}{ m{1.5cm} m{5cm} m{#1} m{#1} m{#1} m{#1} m{#1} m{#1}}\csv@tablehead},
+ }
+ \makeatother
+
+ {\tiny
+ \csvautobooklongtable[separator=comma,
+ respect all,
+ no check column count,
+ perfimprovements column width=1cm,
+ late after line={\\\hline},
+ late after last line={\end{longtable}}
+ ]{../_tmp/src/vpp_performance_tests/performance_improvements/performance_improvements_pdr_low.csv}
+ }
Known Issues
diff --git a/resources/tools/presentation/conf.py b/resources/tools/presentation/conf.py index 2c942c45a8..6cc024033d 100644 --- a/resources/tools/presentation/conf.py +++ b/resources/tools/presentation/conf.py @@ -157,6 +157,8 @@ latex_elements = { \usepackage[defaultsans]{lato} \usepackage{inconsolata} \usepackage{csvsimple} + \usepackage{longtable} + \usepackage{booktabs} ''', # Latex figure (float) alignment diff --git a/resources/tools/presentation/generator_files.py b/resources/tools/presentation/generator_files.py index 0989fc76c0..dd70c70ce7 100644 --- a/resources/tools/presentation/generator_files.py +++ b/resources/tools/presentation/generator_files.py @@ -68,15 +68,20 @@ def file_test_results(file_spec, input_data): file_name = "{0}{1}".format(file_spec["output-file"], file_spec["output-file-ext"]) rst_header = file_spec["file-header"] - rst_include_table = ("\n.. csv-table::\n" - " :header-rows: 1\n" - " :widths: auto\n" - " :align: center\n" - " :file: {file}\n\n") + + rst_include_table = ("\n.. only:: html\n\n" + " .. csv-table::\n" + " :header-rows: 1\n" + " :widths: auto\n" + " :align: center\n" + " :file: {file_html}\n" + "\n.. only:: latex\n\n" + "\n .. raw:: latex\n\n" + " \csvautolongtable{{{file_latex}}}\n\n") logging.info(" Generating the file {0} ...".format(file_name)) - table_lst = get_files(file_spec["dir-tables"], ".csv", full_path=False) + table_lst = get_files(file_spec["dir-tables"], ".csv", full_path=True) if len(table_lst) == 0: logging.error(" No tables to include in '{0}'. Skipping.". format(file_spec["dir-tables"])) @@ -103,7 +108,9 @@ def file_test_results(file_spec, input_data): if tests_in_suite(suite_name, input_data.tests(job, build)): for tbl_file in table_lst: if suite_name in tbl_file: - file_handler.write(rst_include_table. - format(file=tbl_file)) + file_handler.write( + rst_include_table.format( + file_latex=tbl_file, + file_html=tbl_file.split("/")[-1])) logging.info(" Done.") diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py index 8a3f8334a7..55aa24b02f 100644 --- a/resources/tools/presentation/generator_report.py +++ b/resources/tools/presentation/generator_report.py @@ -50,6 +50,7 @@ THEME_OVERRIDES = """/* override table width restrictions */ # Command to build the html format of the report HTML_BUILDER = 'sphinx-build -v -c . -a ' \ '-b html -E ' \ + '-t html ' \ '-D release={release} ' \ '-D version="{release} report - {date}" ' \ '{working_dir} ' \ @@ -58,6 +59,7 @@ HTML_BUILDER = 'sphinx-build -v -c . -a ' \ # Command to build the pdf format of the report PDF_BUILDER = 'sphinx-build -v -c . -a ' \ '-b latex -E ' \ + '-t latex ' \ '-D release={release} ' \ '-D version="{release} report - {date}" ' \ '{working_dir} ' \ |