1 Presentation and Analytics
2 ==========================
7 The presentation and analytics layer (PAL) is the fourth layer of CSIT
8 hierarchy. The model of presentation and analytics layer consists of four
11 - sL1 - Data - input data to be processed:
13 - Static content - .rst text files, .svg static figures, and other files
14 stored in the CSIT git repository.
15 - Data to process - .xml files generated by Jenkins jobs executing tests,
16 stored as robot results files (output.xml).
17 - Specification - .yaml file with the models of report elements (tables,
18 plots, layout, ...) generated by this tool. There is also the configuration
19 of the tool and the specification of input data (jobs and builds).
21 - sL2 - Data processing
23 - The data are read from the specified input files (.xml) and stored as
24 multi-indexed `pandas.Series <https://pandas.pydata.org/pandas-docs/stable/
25 generated/pandas.Series.html>`_.
26 - This layer provides also interface to input data and filtering of the input
29 - sL3 - Data presentation - This layer generates the elements specified in the
32 - Tables: .csv files linked to static .rst files.
33 - Plots: .html files generated using plot.ly linked to static .rst files.
35 - sL4 - Report generation - Sphinx generates required formats and versions:
38 - versions: minimal, full (TODO: define the names and scope of versions)
46 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
47 \includegraphics[width=0.90\textwidth]{pal_layers}
48 \label{fig:pal_layers}
53 .. figure:: pal_layers.svg
63 The report specification file defines which data is used and which outputs are
64 generated. It is human readable and structured. It is easy to add / remove /
65 change items. The specification includes:
67 - Specification of the environment.
68 - Configuration of debug mode (optional).
69 - Specification of input data (jobs, builds, files, ...).
70 - Specification of the output.
71 - What and how is generated:
72 - What: plots, tables.
73 - How: specification of all properties and parameters.
76 Structure of the specification file
77 '''''''''''''''''''''''''''''''''''
79 The specification file is organized as a list of dictionaries distinguished by
103 Each type represents a section. The sections "environment", "debug", "static",
104 "input" and "output" are listed only once in the specification; "table", "file"
105 and "plot" can be there multiple times.
107 Sections "debug", "table", "file" and "plot" are optional.
109 Table(s), files(s) and plot(s) are referred as "elements" in this text. It is
110 possible to define and implement other elements if needed.
116 This section has the following parts:
118 - type: "environment" - says that this is the section "environment".
119 - configuration - configuration of the PAL.
120 - paths - paths used by the PAL.
121 - urls - urls pointing to the data sources.
122 - make-dirs - a list of the directories to be created by the PAL while
123 preparing the environment.
124 - remove-dirs - a list of the directories to be removed while cleaning the
126 - build-dirs - a list of the directories where the results are stored.
128 The structure of the section "Environment" is as follows (example):
137 # - Download of input data files
139 # - Read data from given zip / xml files
140 # - Set the configuration as it is done in normal mode
141 # If the section "type: debug" is missing, CFG[DEBUG] is set to 0.
145 # Top level directories:
149 DIR[BUILD,HTML]: "_build"
150 DIR[BUILD,LATEX]: "_build_latex"
153 DIR[RST]: "../../../docs/report"
155 # Working directories
156 ## Input data files (.zip, .xml)
157 DIR[WORKING,DATA]: "{DIR[WORKING]}/data"
158 ## Static source files from git
159 DIR[WORKING,SRC]: "{DIR[WORKING]}/src"
160 DIR[WORKING,SRC,STATIC]: "{DIR[WORKING,SRC]}/_static"
162 # Static html content
163 DIR[STATIC]: "{DIR[BUILD,HTML]}/_static"
164 DIR[STATIC,VPP]: "{DIR[STATIC]}/vpp"
165 DIR[STATIC,DPDK]: "{DIR[STATIC]}/dpdk"
166 DIR[STATIC,ARCH]: "{DIR[STATIC]}/archive"
168 # Detailed test results
169 DIR[DTR]: "{DIR[WORKING,SRC]}/detailed_test_results"
170 DIR[DTR,PERF,DPDK]: "{DIR[DTR]}/dpdk_performance_results"
171 DIR[DTR,PERF,VPP]: "{DIR[DTR]}/vpp_performance_results"
172 DIR[DTR,FUNC,VPP]: "{DIR[DTR]}/vpp_functional_results"
173 DIR[DTR,PERF,VPP,IMPRV]: "{DIR[WORKING,SRC]}/vpp_performance_tests/performance_improvements"
175 # Detailed test configurations
176 DIR[DTC]: "{DIR[WORKING,SRC]}/test_configuration"
177 DIR[DTC,PERF,VPP]: "{DIR[DTC]}/vpp_performance_configuration"
178 DIR[DTC,FUNC,VPP]: "{DIR[DTC]}/vpp_functional_configuration"
180 # Detailed tests operational data
181 DIR[DTO]: "{DIR[WORKING,SRC]}/test_operational_data"
182 DIR[DTO,PERF,VPP]: "{DIR[DTO]}/vpp_performance_operational_data"
184 # .css patch file to fix tables generated by Sphinx
185 DIR[CSS_PATCH_FILE]: "{DIR[STATIC]}/theme_overrides.css"
186 DIR[CSS_PATCH_FILE2]: "{DIR[WORKING,SRC,STATIC]}/theme_overrides.css"
189 URL[JENKINS,CSIT]: "https://jenkins.fd.io/view/csit/job"
190 URL[S3_STORAGE,LOG]: "https://logs.nginx.service.consul/vex-yul-rot-jenkins-1"
191 URL[NEXUS,LOG]: "https://logs.fd.io/production/vex-yul-rot-jenkins-1"
192 URL[NEXUS,DOC]: "https://docs.fd.io/csit"
193 DIR[NEXUS,DOC]: "report/_static/archive"
196 # List the directories which are created while preparing the environment.
197 # All directories MUST be defined in "paths" section.
198 - "DIR[WORKING,DATA]"
204 - "DIR[WORKING,SRC,STATIC]"
207 # List the directories which are deleted while cleaning the environment.
208 # All directories MUST be defined in "paths" section.
212 # List the directories where the results (build) is stored.
213 # All directories MUST be defined in "paths" section.
217 It is possible to use defined items in the definition of other items, e.g.:
221 DIR[WORKING,DATA]: "{DIR[WORKING]}/data"
223 will be automatically changed to
227 DIR[WORKING,DATA]: "_tmp/data"
230 Section: Configuration
231 ''''''''''''''''''''''
233 This section specifies the groups of parameters which are repeatedly used in the
234 elements defined later in the specification file. It has the following parts:
236 - data sets - Specification of data sets used later in element's specifications
237 to define the input data.
238 - plot layouts - Specification of plot layouts used later in plots'
239 specifications to define the plot layout.
241 The structure of the section "Configuration" is as follows (example):
246 type: "configuration"
248 plot-vpp-throughput-latency:
249 csit-vpp-perf-1710-all:
261 csit-vpp-perf-1710-all:
270 gridcolor: "rgb(238, 238, 238)"
271 linecolor: "rgb(238, 238, 238)"
276 tickcolor: "rgb(238, 238, 238)"
278 title: "Indexed Test Cases"
281 gridcolor: "rgb(238, 238, 238)'"
283 linecolor: "rgb(238, 238, 238)"
289 tickcolor: "rgb(238, 238, 238)"
290 title: "Packets Per Second [pps]"
306 The definitions from this sections are used in the elements, e.g.:
312 title: "VPP Performance 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
313 algorithm: "plot_performance_box"
314 output-file-type: ".html"
315 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc"
317 "plot-vpp-throughput-latency"
318 filter: "'64B' and ('BASE' or 'SCALE') and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
324 boxpoints: "outliers"
327 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
335 This section is optional as it configures the debug mode. It is used if one
336 does not want to download input data files and use local files instead.
338 If the debug mode is configured, the "input" section is ignored.
340 This section has the following parts:
342 - type: "debug" - says that this is the section "debug".
345 - input-format - xml or zip.
346 - extract - if "zip" is defined as the input format, this file is extracted
347 from the zip file, otherwise this parameter is ignored.
349 - builds - list of builds from which the data is used. Must include a job
350 name as a key and then a list of builds and their output files.
352 The structure of the section "Debug" is as follows (example):
359 input-format: "zip" # zip or xml
360 extract: "robot-plugin/output.xml" # Only for zip
362 # The files must be in the directory DIR[WORKING,DATA]
363 csit-dpdk-perf-1707-all:
366 file: "csit-dpdk-perf-1707-all__10.xml"
369 file: "csit-dpdk-perf-1707-all__9.xml"
370 csit-vpp-functional-1707-ubuntu1604-virl:
372 build: lastSuccessfulBuild
373 file: "csit-vpp-functional-1707-ubuntu1604-virl-lastSuccessfulBuild.xml"
374 hc2vpp-csit-integration-1707-ubuntu1604:
376 build: lastSuccessfulBuild
377 file: "hc2vpp-csit-integration-1707-ubuntu1604-lastSuccessfulBuild.xml"
378 csit-vpp-perf-1707-all:
381 file: "csit-vpp-perf-1707-all__16__output.xml"
384 file: "csit-vpp-perf-1707-all__17__output.xml"
390 This section defines the static content which is stored in git and will be used
391 as a source to generate the report.
393 This section has these parts:
395 - type: "static" - says that this section is the "static".
396 - src-path - path to the static content.
397 - dst-path - destination path where the static content is copied and then
404 src-path: "{DIR[RST]}"
405 dst-path: "{DIR[WORKING,SRC]}"
411 This section defines the data used to generate elements. It is mandatory
412 if the debug mode is not used.
414 This section has the following parts:
416 - type: "input" - says that this section is the "input".
417 - general - parameters common to all builds:
419 - file-name: file to be downloaded.
420 - file-format: format of the downloaded file, ".zip" or ".xml" are supported.
421 - download-path: path to be added to url pointing to the file, e.g.:
422 "{job}/{build}/robot/report/*zip*/{filename}"; {job}, {build} and
423 {filename} are replaced by proper values defined in this section.
424 - extract: file to be extracted from downloaded zip file, e.g.: "output.xml";
425 if xml file is downloaded, this parameter is ignored.
427 - builds - list of jobs (keys) and numbers of builds which output data will be
430 The structure of the section "Input" is as follows (example from 17.07 report):
435 type: "input" # Ignored in debug mode
437 file-name: "robot-plugin.zip"
439 download-path: "{job}/{build}/robot/report/*zip*/{filename}"
440 extract: "robot-plugin/output.xml"
442 csit-vpp-perf-1707-all:
454 csit-dpdk-perf-1707-all:
465 csit-vpp-functional-1707-ubuntu1604-virl:
466 - lastSuccessfulBuild
467 hc2vpp-csit-perf-master-ubuntu1604:
470 hc2vpp-csit-integration-1707-ubuntu1604:
471 - lastSuccessfulBuild
476 This section specifies which format(s) will be generated (html, pdf) and which
477 versions will be generated for each format.
479 This section has the following parts:
481 - type: "output" - says that this section is the "output".
482 - format: html or pdf.
483 - version: defined for each format separately.
485 The structure of the section "Output" is as follows (example):
498 TODO: define the names of versions
501 Content of "minimal" version
502 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
504 TODO: define the name and content of this version
510 This section defines a table to be generated. There can be 0 or more "table"
513 This section has the following parts:
515 - type: "table" - says that this section defines a table.
516 - title: Title of the table.
517 - algorithm: Algorithm which is used to generate the table. The other
518 parameters in this section must provide all information needed by the used
520 - template: (optional) a .csv file used as a template while generating the
522 - output-file-ext: extension of the output file.
523 - output-file: file which the table will be written to.
524 - columns: specification of table columns:
526 - title: The title used in the table header.
527 - data: Specification of the data, it has two parts - command and arguments:
531 - template - take the data from template, arguments:
533 - number of column in the template.
535 - data - take the data from the input data, arguments:
537 - jobs and builds which data will be used.
539 - operation - performs an operation with the data already in the table,
542 - operation to be done, e.g.: mean, stdev, relative_change (compute
543 the relative change between two columns) and display number of data
544 samples ~= number of test jobs. The operations are implemented in the
546 TODO: Move from utils,py to e.g. operations.py
547 - numbers of columns which data will be used (optional).
549 - data: Specify the jobs and builds which data is used to generate the table.
550 - filter: filter based on tags applied on the input data, if "template" is
551 used, filtering is based on the template.
552 - parameters: Only these parameters will be put to the output data structure.
554 The structure of the section "Table" is as follows (example of
555 "table_performance_improvements"):
561 title: "Performance improvements"
562 algorithm: "table_performance_improvements"
563 template: "{DIR[DTR,PERF,VPP,IMPRV]}/tmpl_performance_improvements.csv"
564 output-file-ext: ".csv"
565 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/performance_improvements"
568 title: "VPP Functionality"
574 title: "VPP-16.09 mean [Mpps]"
577 title: "VPP-17.01 mean [Mpps]"
580 title: "VPP-17.04 mean [Mpps]"
583 title: "VPP-17.07 mean [Mpps]"
584 data: "data csit-vpp-perf-1707-all mean"
586 title: "VPP-17.07 stdev [Mpps]"
587 data: "data csit-vpp-perf-1707-all stdev"
589 title: "17.04 to 17.07 change [%]"
590 data: "operation relative_change 5 4"
592 csit-vpp-perf-1707-all:
607 Example of "table_details" which generates "Detailed Test Results - VPP
608 Performance Results":
614 title: "Detailed Test Results - VPP Performance Results"
615 algorithm: "table_details"
616 output-file-ext: ".csv"
617 output-file: "{DIR[WORKING]}/vpp_performance_results"
621 data: "data test_name"
623 title: "Documentation"
624 data: "data test_documentation"
627 data: "data test_msg"
629 csit-vpp-perf-1707-all:
637 Example of "table_details" which generates "Test configuration - VPP Performance
644 title: "Test configuration - VPP Performance Test Configs"
645 algorithm: "table_details"
646 output-file-ext: ".csv"
647 output-file: "{DIR[WORKING]}/vpp_test_configuration"
653 title: "VPP API Test (VAT) Commands History - Commands Used Per Test Case"
654 data: "data show-run"
656 csit-vpp-perf-1707-all:
668 This section defines a plot to be generated. There can be 0 or more "plot"
671 This section has these parts:
673 - type: "plot" - says that this section defines a plot.
674 - title: Plot title used in the logs. Title which is displayed is in the
676 - output-file-type: format of the output file.
677 - output-file: file which the plot will be written to.
678 - algorithm: Algorithm used to generate the plot. The other parameters in this
679 section must provide all information needed by plot.ly to generate the plot.
685 - These parameters are transparently passed to plot.ly.
687 - data: Specify the jobs and numbers of builds which data is used to generate
689 - filter: filter applied on the input data.
690 - parameters: Only these parameters will be put to the output data structure.
692 The structure of the section "Plot" is as follows (example of a plot showing
693 throughput in a chart box-with-whiskers):
699 title: "VPP Performance 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
700 algorithm: "plot_performance_box"
701 output-file-type: ".html"
702 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc"
704 csit-vpp-perf-1707-all:
715 # Keep this formatting, the filter is enclosed with " (quotation mark) and
716 # each tag is enclosed with ' (apostrophe).
717 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
723 boxpoints: "outliers"
726 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
731 gridcolor: "rgb(238, 238, 238)"
732 linecolor: "rgb(238, 238, 238)"
737 tickcolor: "rgb(238, 238, 238)"
739 title: "Indexed Test Cases"
742 gridcolor: "rgb(238, 238, 238)'"
744 linecolor: "rgb(238, 238, 238)"
750 tickcolor: "rgb(238, 238, 238)"
751 title: "Packets Per Second [pps]"
767 The structure of the section "Plot" is as follows (example of a plot showing
768 latency in a box chart):
774 title: "VPP Latency 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
775 algorithm: "plot_latency_box"
776 output-file-type: ".html"
777 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc-lat50"
779 csit-vpp-perf-1707-all:
790 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
797 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
802 gridcolor: "rgb(238, 238, 238)"
803 linecolor: "rgb(238, 238, 238)"
808 tickcolor: "rgb(238, 238, 238)"
810 title: "Indexed Test Cases"
813 gridcolor: "rgb(238, 238, 238)'"
815 linecolor: "rgb(238, 238, 238)"
821 tickcolor: "rgb(238, 238, 238)"
822 title: "Latency min/avg/max [uSec]"
838 The structure of the section "Plot" is as follows (example of a plot showing
839 VPP HTTP server performance in a box chart with pre-defined data
840 "plot-vpp-http-server-performance" set and plot layout "plot-cps"):
846 title: "VPP HTTP Server Performance"
847 algorithm: "plot_http_server_perf_box"
848 output-file-type: ".html"
849 output-file: "{DIR[STATIC,VPP]}/http-server-performance-cps"
851 "plot-vpp-httlp-server-performance"
852 # Keep this formatting, the filter is enclosed with " (quotation mark) and
853 # each tag is enclosed with ' (apostrophe).
854 filter: "'HTTP' and 'TCP_CPS'"
860 boxpoints: "outliers"
863 title: "VPP HTTP Server Performance"
871 This section defines a file to be generated. There can be 0 or more "file"
874 This section has the following parts:
876 - type: "file" - says that this section defines a file.
877 - title: Title of the table.
878 - algorithm: Algorithm which is used to generate the file. The other
879 parameters in this section must provide all information needed by the used
881 - output-file-ext: extension of the output file.
882 - output-file: file which the file will be written to.
883 - file-header: The header of the generated .rst file.
884 - dir-tables: The directory with the tables.
885 - data: Specify the jobs and builds which data is used to generate the table.
886 - filter: filter based on tags applied on the input data, if "all" is
887 used, no filtering is done.
888 - parameters: Only these parameters will be put to the output data structure.
889 - chapters: the hierarchy of chapters in the generated file.
890 - start-level: the level of the the top-level chapter.
892 The structure of the section "file" is as follows (example):
898 title: "VPP Performance Results"
899 algorithm: "file_test_results"
900 output-file-ext: ".rst"
901 output-file: "{DIR[DTR,PERF,VPP]}/vpp_performance_results"
902 file-header: "\n.. |br| raw:: html\n\n <br />\n\n\n.. |prein| raw:: html\n\n <pre>\n\n\n.. |preout| raw:: html\n\n </pre>\n\n"
903 dir-tables: "{DIR[DTR,PERF,VPP]}"
905 csit-vpp-perf-1707-all:
912 data-start-level: 2 # 0, 1, 2, ...
913 chapters-start-level: 2 # 0, 1, 2, ...
919 - Manually created / edited files.
920 - .rst files, static .csv files, static pictures (.svg), ...
921 - Stored in CSIT git repository.
923 No more details about the static content in this document.
929 The PAL processes tests results and other information produced by Jenkins jobs.
930 The data are now stored as robot results in Jenkins (TODO: store the data in
931 nexus) either as .zip and / or .xml files.
937 As the first step, the data are downloaded and stored locally (typically on a
938 Jenkins slave). If .zip files are used, the given .xml files are extracted for
941 Parsing of the .xml files is performed by a class derived from
942 "robot.api.ResultVisitor", only necessary methods are overridden. All and only
943 necessary data is extracted from .xml file and stored in a structured form.
945 The parsed data are stored as the multi-indexed pandas.Series data type. Its
946 structure is as follows:
956 "job name", "build", "metadata", "suites", "tests" are indexes to access the
985 Using indexes data["job 1 name"]["build 1"]["tests"] (e.g.:
986 data["csit-vpp-perf-1704-all"]["17"]["tests"]) we get a list of all tests with
989 Data will not be accessible directly using indexes, but using getters and
992 **Structure of metadata:**
997 "version": "VPP version",
998 "job": "Jenkins job name"
999 "build": "Information about the build"
1002 **Structure of suites:**
1008 "doc": "Suite 1 documentation"
1009 "parent": "Suite 1 parent"
1012 "doc": "Suite N documentation"
1013 "parent": "Suite N parent"
1016 **Structure of tests:**
1024 "name": "Test name",
1025 "parent": "Name of the parent of the test",
1026 "doc": "Test documentation"
1027 "msg": "Test message"
1028 "tags": ["tag 1", "tag 2", "tag n"],
1029 "type": "PDR" | "NDR",
1032 "unit": "pps" | "bps" | "percentage"
1041 "50": { # Only for NDR
1046 "10": { # Only for NDR
1058 "50": { # Only for NDR
1063 "10": { # Only for NDR
1070 "lossTolerance": "lossTolerance" # Only for PDR
1071 "vat-history": "DUT1 and DUT2 VAT History"
1073 "show-run": "Show Run"
1085 "name": "Test name",
1086 "parent": "Name of the parent of the test",
1087 "doc": "Test documentation"
1088 "msg": "Test message"
1089 "tags": ["tag 1", "tag 2", "tag n"],
1090 "vat-history": "DUT1 and DUT2 VAT History"
1091 "show-run": "Show Run"
1092 "status": "PASS" | "FAIL"
1099 Note: ID is the lowercase full path to the test.
1105 The first step when generating an element is getting the data needed to
1106 construct the element. The data are filtered from the processed input data.
1108 The data filtering is based on:
1113 - required data - only this data is included in the output.
1115 WARNING: The filtering is based on tags, so be careful with tagging.
1117 For example, the element which specification includes:
1122 csit-vpp-perf-1707-all:
1134 - "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1136 will be constructed using data from the job "csit-vpp-perf-1707-all", for all
1137 listed builds and the tests with the list of tags matching the filter
1140 The output data structure for filtered test data is:
1163 Data analytics part implements:
1165 - methods to compute statistical data from the filtered input data.
1168 Throughput Speedup Analysis - Multi-Core with Multi-Threading
1169 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1171 Throughput Speedup Analysis (TSA) calculates throughput speedup ratios
1172 for tested 1-, 2- and 4-core multi-threaded VPP configurations using the
1178 N_core_throughput_speedup = -----------------
1181 Multi-core throughput speedup ratios are plotted in grouped bar graphs
1182 for throughput tests with 64B/78B frame size, with number of cores on
1183 X-axis and speedup ratio on Y-axis.
1185 For better comparison multiple test results' data sets are plotted per
1188 - graph type: grouped bars;
1189 - graph X-axis: (testcase index, number of cores);
1190 - graph Y-axis: speedup factor.
1192 Subset of existing performance tests is covered by TSA graphs.
1200 title: "TSA: 64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1201 algorithm: "plot_throughput_speedup_analysis"
1202 output-file-type: ".html"
1203 output-file: "{DIR[STATIC,VPP]}/10ge2p1x520-64B-l2-tsa-ndrdisc"
1205 "plot-throughput-speedup-analysis"
1206 filter: "'NIC_Intel-X520-DA2' and '64B' and 'BASE' and 'NDRDISC' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1212 title: "64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1214 "plot-throughput-speedup-analysis"
1217 Comparison of results from two sets of the same test executions
1218 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1220 This algorithm enables comparison of results coming from two sets of the
1221 same test executions. It is used to quantify performance changes across
1222 all tests after test environment changes e.g. Operating System
1223 upgrades/patches, Hardware changes.
1225 It is assumed that each set of test executions includes multiple runs
1226 of the same tests, 10 or more, to verify test results repeatibility and
1227 to yield statistically meaningful results data.
1229 Comparison results are presented in a table with a specified number of
1230 the best and the worst relative changes between the two sets. Following table
1231 columns are defined:
1234 - throughput mean values of the reference set;
1235 - throughput standard deviation of the reference set;
1236 - throughput mean values of the set to compare;
1237 - throughput standard deviation of the set to compare;
1238 - relative change of the mean values.
1242 The model specifies:
1244 - type: "table" - means this section defines a table.
1245 - title: Title of the table.
1246 - algorithm: Algorithm which is used to generate the table. The other
1247 parameters in this section must provide all information needed by the used
1249 - output-file-ext: Extension of the output file.
1250 - output-file: File which the table will be written to.
1251 - reference - the builds which are used as the reference for comparison.
1252 - compare - the builds which are compared to the reference.
1253 - data: Specify the sources, jobs and builds, providing data for generating
1255 - filter: Filter based on tags applied on the input data, if "template" is
1256 used, filtering is based on the template.
1257 - parameters: Only these parameters will be put to the output data
1259 - nr-of-tests-shown: Number of the best and the worst tests presented in the
1260 table. Use 0 (zero) to present all tests.
1268 title: "Performance comparison"
1269 algorithm: "table_perf_comparison"
1270 output-file-ext: ".csv"
1271 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/vpp_performance_comparison"
1273 title: "csit-vpp-perf-1801-all - 1"
1275 csit-vpp-perf-1801-all:
1279 title: "csit-vpp-perf-1801-all - 2"
1281 csit-vpp-perf-1801-all:
1285 "vpp-perf-comparison"
1291 nr-of-tests-shown: 20
1294 Advanced data analytics
1295 ```````````````````````
1297 In the future advanced data analytics (ADA) will be added to analyze the
1298 telemetry data collected from SUT telemetry sources and correlate it to
1299 performance test results.
1303 - describe the concept of ADA.
1304 - add specification.
1310 Generates the plots and tables according to the report models per
1311 specification file. The elements are generated using algorithms and data
1312 specified in their models.
1318 - tables are generated by algorithms implemented in PAL, the model includes the
1319 algorithm and all necessary information.
1320 - output format: csv
1321 - generated tables are stored in specified directories and linked to .rst
1328 - `plot.ly <https://plot.ly/>`_ is currently used to generate plots, the model
1329 includes the type of plot and all the necessary information to render it.
1330 - output format: html.
1331 - generated plots are stored in specified directories and linked to .rst files.
1337 Report is generated using Sphinx and Read_the_Docs template. PAL generates html
1338 and pdf formats. It is possible to define the content of the report by
1339 specifying the version (TODO: define the names and content of versions).
1345 1. Read the specification.
1346 2. Read the input data.
1347 3. Process the input data.
1348 4. For element (plot, table, file) defined in specification:
1350 a. Get the data needed to construct the element using a filter.
1351 b. Generate the element.
1352 c. Store the element.
1354 5. Generate the report.
1355 6. Store the report (Nexus).
1357 The process is model driven. The elements' models (tables, plots, files
1358 and report itself) are defined in the specification file. Script reads
1359 the elements' models from specification file and generates the elements.
1361 It is easy to add elements to be generated in the report. If a new type
1362 of an element is required, only a new algorithm needs to be implemented
1366 Continuous Performance Measurements and Trending
1367 ------------------------------------------------
1369 Performance analysis and trending execution sequence:
1370 `````````````````````````````````````````````````````
1372 CSIT PA runs performance analysis, change detection and trending using specified
1373 trend analysis metrics over the rolling window of last <N> sets of historical
1374 measurement data. PA is defined as follows:
1378 #. By PT job at its completion.
1379 #. Manually from Jenkins UI.
1381 #. Download and parse archived historical data and the new data:
1383 #. New data from latest PT job is evaluated against the rolling window
1384 of <N> sets of historical data.
1385 #. Download RF output.xml files and compressed archived data.
1386 #. Parse out the data filtering test cases listed in PA specification
1387 (part of CSIT PAL specification file).
1389 #. Calculate trend metrics for the rolling window of <N> sets of historical
1392 #. Calculate quartiles Q1, Q2, Q3.
1393 #. Trim outliers using IQR.
1394 #. Calculate TMA and TMSD.
1395 #. Calculate normal trending range per test case based on TMA and TMSD.
1397 #. Evaluate new test data against trend metrics:
1399 #. If within the range of (TMA +/- 3*TMSD) => Result = Pass,
1401 #. If below the range => Result = Fail, Reason = Regression.
1402 #. If above the range => Result = Pass, Reason = Progression.
1404 #. Generate and publish results
1406 #. Relay evaluation result to job result.
1407 #. Generate a new set of trend analysis summary graphs and drill-down
1410 #. Summary graphs to include measured values with Normal,
1411 Progression and Regression markers. MM shown in the background if
1413 #. Drill-down graphs to include MM, TMA and TMSD.
1415 #. Publish trend analysis graphs in html format on
1416 https://s3-docs.fd.io/csit/master/trending/.
1419 Parameters to specify:
1420 ``````````````````````
1422 *General section - parameters common to all plots:*
1425 - title: The title of this section;
1426 - output-file-type: only ".html" is supported;
1427 - output-file: path where the generated files will be stored.
1433 - input data for plots;
1435 - job to be monitored - the Jenkins job which results are used as input
1437 - builds used for trending plot(s) - specified by a list of build
1438 numbers or by a range of builds defined by the first and the last
1441 - tests to be displayed in the plot defined by a filter;
1442 - list of parameters to extract from the data;
1451 title: "Continuous Performance Trending and Analysis"
1452 output-file-type: ".html"
1453 output-file: "{DIR[STATIC,VPP]}/cpta"
1456 - title: "VPP 1T1C L2 64B Packet Throughput - Trending"
1457 output-file-name: "l2-1t1c-x520"
1458 data: "plot-performance-trending-vpp"
1459 filter: "'NIC_Intel-X520-DA2' and 'MRR' and '64B' and ('BASE' or 'SCALE') and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST' and not 'MEMIF'"
1462 layout: "plot-cpta-vpp"
1464 - title: "DPDK 4T4C IMIX MRR Trending"
1465 output-file-name: "dpdk-imix-4t4c-xl710"
1466 data: "plot-performance-trending-dpdk"
1467 filter: "'NIC_Intel-XL710' and 'IMIX' and 'MRR' and '4T4C' and 'DPDK'"
1470 layout: "plot-cpta-dpdk"
1475 Performance dashboard tables provide the latest VPP throughput trend, trend
1476 compliance and detected anomalies, all on a per VPP test case basis.
1477 The Dashboard is generated as three tables for 1t1c, 2t2c and 4t4c MRR tests.
1479 At first, the .csv tables are generated (only the table for 1t1c is shown):
1485 title: "Performance trending dashboard"
1486 algorithm: "table_perf_trending_dash"
1487 output-file-ext: ".csv"
1488 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c"
1489 data: "plot-performance-trending-all"
1490 filter: "'MRR' and '1T1C'"
1496 - "tests.vpp.perf.l2.10ge2p1x520-eth-l2bdscale1mmaclrn-mrr.tc01-64b-1t1c-eth-l2bdscale1mmaclrn-ndrdisc"
1499 evaluated-window: 14
1500 long-trend-window: 180
1502 Then, html tables stored inside .rst files are generated:
1508 title: "HTML performance trending dashboard 1t1c"
1509 algorithm: "table_perf_trending_dash_html"
1510 input-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.csv"
1511 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.rst"
1516 Root Cause Analysis (RCA) by analysing archived performance results – re-analyse
1517 available data for specified:
1519 - range of jobs builds,
1520 - set of specific tests and
1521 - PASS/FAIL criteria to detect performance change.
1523 In addition, PAL generates trending plots to show performance over the specified
1526 Root Cause Analysis - Option 1: Analysing Archived VPP Results
1527 ``````````````````````````````````````````````````````````````
1529 It can be used to speed-up the process, or when the existing data is sufficient.
1530 In this case, PAL uses existing data saved in Nexus, searches for performance
1531 degradations and generates plots to show performance over the specified time
1532 interval for the selected tests.
1537 #. Download and parse archived historical data and the new data.
1538 #. Calculate trend metrics.
1539 #. Find regression / progression.
1540 #. Generate and publish results:
1542 #. Summary graphs to include measured values with Progression and
1544 #. List the DUT build(s) where the anomalies were detected.
1546 CSIT PAL Specification
1547 ''''''''''''''''''''''
1551 - first build (Good); specified by the Jenkins job name and the build
1553 - last build (Bad); specified by the Jenkins job name and the build
1559 - tests of interest; list of tests (full name is used) which results are
1572 List of modules, classes, methods and functions
1573 ```````````````````````````````````````````````
1577 specification_parser.py
1600 input_data_parser.py
1641 Functions implementing algorithms to generate particular types of
1642 tables (called by the function "generate_tables"):
1644 table_performance_improvements
1652 Functions implementing algorithms to generate particular types of
1653 plots (called by the function "generate_plots"):
1654 plot_performance_box
1663 Functions implementing algorithms to generate particular types of
1664 files (called by the function "generate_files"):
1673 Functions implementing algorithms to generate particular types of
1674 report (called by the function "generate_report"):
1675 generate_html_report
1678 Other functions called by the function "generate_report":
1683 PAL functional diagram
1684 ``````````````````````
1692 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
1693 \includegraphics[width=0.90\textwidth]{pal_func_diagram}
1694 \label{fig:pal_func_diagram}
1699 .. figure:: pal_func_diagram.svg
1700 :alt: PAL functional diagram
1704 How to add an element
1705 `````````````````````
1707 Element can be added by adding it's model to the specification file. If
1708 the element is to be generated by an existing algorithm, only it's
1709 parameters must be set.
1711 If a brand new type of element needs to be added, also the algorithm
1712 must be implemented. Element generation algorithms are implemented in
1713 the files with names starting with "generator" prefix. The name of the
1714 function implementing the algorithm and the name of algorithm in the
1715 specification file have to be the same.