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,PERF,HC]: "{DIR[DTR]}/honeycomb_performance_results"
173 DIR[DTR,FUNC,VPP]: "{DIR[DTR]}/vpp_functional_results"
174 DIR[DTR,FUNC,HC]: "{DIR[DTR]}/honeycomb_functional_results"
175 DIR[DTR,FUNC,NSHSFC]: "{DIR[DTR]}/nshsfc_functional_results"
176 DIR[DTR,PERF,VPP,IMPRV]: "{DIR[WORKING,SRC]}/vpp_performance_tests/performance_improvements"
178 # Detailed test configurations
179 DIR[DTC]: "{DIR[WORKING,SRC]}/test_configuration"
180 DIR[DTC,PERF,VPP]: "{DIR[DTC]}/vpp_performance_configuration"
181 DIR[DTC,FUNC,VPP]: "{DIR[DTC]}/vpp_functional_configuration"
183 # Detailed tests operational data
184 DIR[DTO]: "{DIR[WORKING,SRC]}/test_operational_data"
185 DIR[DTO,PERF,VPP]: "{DIR[DTO]}/vpp_performance_operational_data"
187 # .css patch file to fix tables generated by Sphinx
188 DIR[CSS_PATCH_FILE]: "{DIR[STATIC]}/theme_overrides.css"
189 DIR[CSS_PATCH_FILE2]: "{DIR[WORKING,SRC,STATIC]}/theme_overrides.css"
192 URL[JENKINS,CSIT]: "https://jenkins.fd.io/view/csit/job"
193 URL[JENKINS,HC]: "https://jenkins.fd.io/view/hc2vpp/job"
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-nsh_sfc-verify-func-1707-ubuntu1604-virl:
373 file: "csit-nsh_sfc-verify-func-1707-ubuntu1604-virl-2.xml"
374 csit-vpp-functional-1707-ubuntu1604-virl:
376 build: lastSuccessfulBuild
377 file: "csit-vpp-functional-1707-ubuntu1604-virl-lastSuccessfulBuild.xml"
378 hc2vpp-csit-integration-1707-ubuntu1604:
380 build: lastSuccessfulBuild
381 file: "hc2vpp-csit-integration-1707-ubuntu1604-lastSuccessfulBuild.xml"
382 csit-vpp-perf-1707-all:
385 file: "csit-vpp-perf-1707-all__16__output.xml"
388 file: "csit-vpp-perf-1707-all__17__output.xml"
394 This section defines the static content which is stored in git and will be used
395 as a source to generate the report.
397 This section has these parts:
399 - type: "static" - says that this section is the "static".
400 - src-path - path to the static content.
401 - dst-path - destination path where the static content is copied and then
408 src-path: "{DIR[RST]}"
409 dst-path: "{DIR[WORKING,SRC]}"
415 This section defines the data used to generate elements. It is mandatory
416 if the debug mode is not used.
418 This section has the following parts:
420 - type: "input" - says that this section is the "input".
421 - general - parameters common to all builds:
423 - file-name: file to be downloaded.
424 - file-format: format of the downloaded file, ".zip" or ".xml" are supported.
425 - download-path: path to be added to url pointing to the file, e.g.:
426 "{job}/{build}/robot/report/*zip*/{filename}"; {job}, {build} and
427 {filename} are replaced by proper values defined in this section.
428 - extract: file to be extracted from downloaded zip file, e.g.: "output.xml";
429 if xml file is downloaded, this parameter is ignored.
431 - builds - list of jobs (keys) and numbers of builds which output data will be
434 The structure of the section "Input" is as follows (example from 17.07 report):
439 type: "input" # Ignored in debug mode
441 file-name: "robot-plugin.zip"
443 download-path: "{job}/{build}/robot/report/*zip*/{filename}"
444 extract: "robot-plugin/output.xml"
446 csit-vpp-perf-1707-all:
458 csit-dpdk-perf-1707-all:
469 csit-vpp-functional-1707-ubuntu1604-virl:
470 - lastSuccessfulBuild
471 hc2vpp-csit-perf-master-ubuntu1604:
474 hc2vpp-csit-integration-1707-ubuntu1604:
475 - lastSuccessfulBuild
476 csit-nsh_sfc-verify-func-1707-ubuntu1604-virl:
483 This section specifies which format(s) will be generated (html, pdf) and which
484 versions will be generated for each format.
486 This section has the following parts:
488 - type: "output" - says that this section is the "output".
489 - format: html or pdf.
490 - version: defined for each format separately.
492 The structure of the section "Output" is as follows (example):
505 TODO: define the names of versions
508 Content of "minimal" version
509 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
511 TODO: define the name and content of this version
517 This section defines a table to be generated. There can be 0 or more "table"
520 This section has the following parts:
522 - type: "table" - says that this section defines a table.
523 - title: Title of the table.
524 - algorithm: Algorithm which is used to generate the table. The other
525 parameters in this section must provide all information needed by the used
527 - template: (optional) a .csv file used as a template while generating the
529 - output-file-ext: extension of the output file.
530 - output-file: file which the table will be written to.
531 - columns: specification of table columns:
533 - title: The title used in the table header.
534 - data: Specification of the data, it has two parts - command and arguments:
538 - template - take the data from template, arguments:
540 - number of column in the template.
542 - data - take the data from the input data, arguments:
544 - jobs and builds which data will be used.
546 - operation - performs an operation with the data already in the table,
549 - operation to be done, e.g.: mean, stdev, relative_change (compute
550 the relative change between two columns) and display number of data
551 samples ~= number of test jobs. The operations are implemented in the
553 TODO: Move from utils,py to e.g. operations.py
554 - numbers of columns which data will be used (optional).
556 - data: Specify the jobs and builds which data is used to generate the table.
557 - filter: filter based on tags applied on the input data, if "template" is
558 used, filtering is based on the template.
559 - parameters: Only these parameters will be put to the output data structure.
561 The structure of the section "Table" is as follows (example of
562 "table_performance_improvements"):
568 title: "Performance improvements"
569 algorithm: "table_performance_improvements"
570 template: "{DIR[DTR,PERF,VPP,IMPRV]}/tmpl_performance_improvements.csv"
571 output-file-ext: ".csv"
572 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/performance_improvements"
575 title: "VPP Functionality"
581 title: "VPP-16.09 mean [Mpps]"
584 title: "VPP-17.01 mean [Mpps]"
587 title: "VPP-17.04 mean [Mpps]"
590 title: "VPP-17.07 mean [Mpps]"
591 data: "data csit-vpp-perf-1707-all mean"
593 title: "VPP-17.07 stdev [Mpps]"
594 data: "data csit-vpp-perf-1707-all stdev"
596 title: "17.04 to 17.07 change [%]"
597 data: "operation relative_change 5 4"
599 csit-vpp-perf-1707-all:
614 Example of "table_details" which generates "Detailed Test Results - VPP
615 Performance Results":
621 title: "Detailed Test Results - VPP Performance Results"
622 algorithm: "table_details"
623 output-file-ext: ".csv"
624 output-file: "{DIR[WORKING]}/vpp_performance_results"
628 data: "data test_name"
630 title: "Documentation"
631 data: "data test_documentation"
634 data: "data test_msg"
636 csit-vpp-perf-1707-all:
644 Example of "table_details" which generates "Test configuration - VPP Performance
651 title: "Test configuration - VPP Performance Test Configs"
652 algorithm: "table_details"
653 output-file-ext: ".csv"
654 output-file: "{DIR[WORKING]}/vpp_test_configuration"
660 title: "VPP API Test (VAT) Commands History - Commands Used Per Test Case"
661 data: "data show-run"
663 csit-vpp-perf-1707-all:
675 This section defines a plot to be generated. There can be 0 or more "plot"
678 This section has these parts:
680 - type: "plot" - says that this section defines a plot.
681 - title: Plot title used in the logs. Title which is displayed is in the
683 - output-file-type: format of the output file.
684 - output-file: file which the plot will be written to.
685 - algorithm: Algorithm used to generate the plot. The other parameters in this
686 section must provide all information needed by plot.ly to generate the plot.
692 - These parameters are transparently passed to plot.ly.
694 - data: Specify the jobs and numbers of builds which data is used to generate
696 - filter: filter applied on the input data.
697 - parameters: Only these parameters will be put to the output data structure.
699 The structure of the section "Plot" is as follows (example of a plot showing
700 throughput in a chart box-with-whiskers):
706 title: "VPP Performance 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
707 algorithm: "plot_performance_box"
708 output-file-type: ".html"
709 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc"
711 csit-vpp-perf-1707-all:
722 # Keep this formatting, the filter is enclosed with " (quotation mark) and
723 # each tag is enclosed with ' (apostrophe).
724 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
730 boxpoints: "outliers"
733 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
738 gridcolor: "rgb(238, 238, 238)"
739 linecolor: "rgb(238, 238, 238)"
744 tickcolor: "rgb(238, 238, 238)"
746 title: "Indexed Test Cases"
749 gridcolor: "rgb(238, 238, 238)'"
751 linecolor: "rgb(238, 238, 238)"
757 tickcolor: "rgb(238, 238, 238)"
758 title: "Packets Per Second [pps]"
774 The structure of the section "Plot" is as follows (example of a plot showing
775 latency in a box chart):
781 title: "VPP Latency 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
782 algorithm: "plot_latency_box"
783 output-file-type: ".html"
784 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc-lat50"
786 csit-vpp-perf-1707-all:
797 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
804 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
809 gridcolor: "rgb(238, 238, 238)"
810 linecolor: "rgb(238, 238, 238)"
815 tickcolor: "rgb(238, 238, 238)"
817 title: "Indexed Test Cases"
820 gridcolor: "rgb(238, 238, 238)'"
822 linecolor: "rgb(238, 238, 238)"
828 tickcolor: "rgb(238, 238, 238)"
829 title: "Latency min/avg/max [uSec]"
845 The structure of the section "Plot" is as follows (example of a plot showing
846 VPP HTTP server performance in a box chart with pre-defined data
847 "plot-vpp-httlp-server-performance" set and plot layout "plot-cps"):
853 title: "VPP HTTP Server Performance"
854 algorithm: "plot_http_server_performance_box"
855 output-file-type: ".html"
856 output-file: "{DIR[STATIC,VPP]}/http-server-performance-cps"
858 "plot-vpp-httlp-server-performance"
859 # Keep this formatting, the filter is enclosed with " (quotation mark) and
860 # each tag is enclosed with ' (apostrophe).
861 filter: "'HTTP' and 'TCP_CPS'"
867 boxpoints: "outliers"
870 title: "VPP HTTP Server Performance"
878 This section defines a file to be generated. There can be 0 or more "file"
881 This section has the following parts:
883 - type: "file" - says that this section defines a file.
884 - title: Title of the table.
885 - algorithm: Algorithm which is used to generate the file. The other
886 parameters in this section must provide all information needed by the used
888 - output-file-ext: extension of the output file.
889 - output-file: file which the file will be written to.
890 - file-header: The header of the generated .rst file.
891 - dir-tables: The directory with the tables.
892 - data: Specify the jobs and builds which data is used to generate the table.
893 - filter: filter based on tags applied on the input data, if "all" is
894 used, no filtering is done.
895 - parameters: Only these parameters will be put to the output data structure.
896 - chapters: the hierarchy of chapters in the generated file.
897 - start-level: the level of the the top-level chapter.
899 The structure of the section "file" is as follows (example):
905 title: "VPP Performance Results"
906 algorithm: "file_test_results"
907 output-file-ext: ".rst"
908 output-file: "{DIR[DTR,PERF,VPP]}/vpp_performance_results"
909 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"
910 dir-tables: "{DIR[DTR,PERF,VPP]}"
912 csit-vpp-perf-1707-all:
919 data-start-level: 2 # 0, 1, 2, ...
920 chapters-start-level: 2 # 0, 1, 2, ...
926 - Manually created / edited files.
927 - .rst files, static .csv files, static pictures (.svg), ...
928 - Stored in CSIT git repository.
930 No more details about the static content in this document.
936 The PAL processes tests results and other information produced by Jenkins jobs.
937 The data are now stored as robot results in Jenkins (TODO: store the data in
938 nexus) either as .zip and / or .xml files.
944 As the first step, the data are downloaded and stored locally (typically on a
945 Jenkins slave). If .zip files are used, the given .xml files are extracted for
948 Parsing of the .xml files is performed by a class derived from
949 "robot.api.ResultVisitor", only necessary methods are overridden. All and only
950 necessary data is extracted from .xml file and stored in a structured form.
952 The parsed data are stored as the multi-indexed pandas.Series data type. Its
953 structure is as follows:
963 "job name", "build", "metadata", "suites", "tests" are indexes to access the
992 Using indexes data["job 1 name"]["build 1"]["tests"] (e.g.:
993 data["csit-vpp-perf-1704-all"]["17"]["tests"]) we get a list of all tests with
996 Data will not be accessible directly using indexes, but using getters and
999 **Structure of metadata:**
1004 "version": "VPP version",
1005 "job": "Jenkins job name"
1006 "build": "Information about the build"
1009 **Structure of suites:**
1015 "doc": "Suite 1 documentation"
1016 "parent": "Suite 1 parent"
1019 "doc": "Suite N documentation"
1020 "parent": "Suite N parent"
1023 **Structure of tests:**
1031 "name": "Test name",
1032 "parent": "Name of the parent of the test",
1033 "doc": "Test documentation"
1034 "msg": "Test message"
1035 "tags": ["tag 1", "tag 2", "tag n"],
1036 "type": "PDR" | "NDR",
1039 "unit": "pps" | "bps" | "percentage"
1048 "50": { # Only for NDR
1053 "10": { # Only for NDR
1065 "50": { # Only for NDR
1070 "10": { # Only for NDR
1077 "lossTolerance": "lossTolerance" # Only for PDR
1078 "vat-history": "DUT1 and DUT2 VAT History"
1080 "show-run": "Show Run"
1092 "name": "Test name",
1093 "parent": "Name of the parent of the test",
1094 "doc": "Test documentation"
1095 "msg": "Test message"
1096 "tags": ["tag 1", "tag 2", "tag n"],
1097 "vat-history": "DUT1 and DUT2 VAT History"
1098 "show-run": "Show Run"
1099 "status": "PASS" | "FAIL"
1106 Note: ID is the lowercase full path to the test.
1112 The first step when generating an element is getting the data needed to
1113 construct the element. The data are filtered from the processed input data.
1115 The data filtering is based on:
1120 - required data - only this data is included in the output.
1122 WARNING: The filtering is based on tags, so be careful with tagging.
1124 For example, the element which specification includes:
1129 csit-vpp-perf-1707-all:
1141 - "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1143 will be constructed using data from the job "csit-vpp-perf-1707-all", for all
1144 listed builds and the tests with the list of tags matching the filter
1147 The output data structure for filtered test data is:
1170 Data analytics part implements:
1172 - methods to compute statistical data from the filtered input data.
1175 Throughput Speedup Analysis - Multi-Core with Multi-Threading
1176 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1178 Throughput Speedup Analysis (TSA) calculates throughput speedup ratios
1179 for tested 1-, 2- and 4-core multi-threaded VPP configurations using the
1185 N_core_throughput_speedup = -----------------
1188 Multi-core throughput speedup ratios are plotted in grouped bar graphs
1189 for throughput tests with 64B/78B frame size, with number of cores on
1190 X-axis and speedup ratio on Y-axis.
1192 For better comparison multiple test results' data sets are plotted per
1195 - graph type: grouped bars;
1196 - graph X-axis: (testcase index, number of cores);
1197 - graph Y-axis: speedup factor.
1199 Subset of existing performance tests is covered by TSA graphs.
1207 title: "TSA: 64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1208 algorithm: "plot_throughput_speedup_analysis"
1209 output-file-type: ".html"
1210 output-file: "{DIR[STATIC,VPP]}/10ge2p1x520-64B-l2-tsa-ndrdisc"
1212 "plot-throughput-speedup-analysis"
1213 filter: "'NIC_Intel-X520-DA2' and '64B' and 'BASE' and 'NDRDISC' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1219 title: "64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1221 "plot-throughput-speedup-analysis"
1224 Comparison of results from two sets of the same test executions
1225 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1227 This algorithm enables comparison of results coming from two sets of the
1228 same test executions. It is used to quantify performance changes across
1229 all tests after test environment changes e.g. Operating System
1230 upgrades/patches, Hardware changes.
1232 It is assumed that each set of test executions includes multiple runs
1233 of the same tests, 10 or more, to verify test results repeatibility and
1234 to yield statistically meaningful results data.
1236 Comparison results are presented in a table with a specified number of
1237 the best and the worst relative changes between the two sets. Following table
1238 columns are defined:
1241 - throughput mean values of the reference set;
1242 - throughput standard deviation of the reference set;
1243 - throughput mean values of the set to compare;
1244 - throughput standard deviation of the set to compare;
1245 - relative change of the mean values.
1249 The model specifies:
1251 - type: "table" - means this section defines a table.
1252 - title: Title of the table.
1253 - algorithm: Algorithm which is used to generate the table. The other
1254 parameters in this section must provide all information needed by the used
1256 - output-file-ext: Extension of the output file.
1257 - output-file: File which the table will be written to.
1258 - reference - the builds which are used as the reference for comparison.
1259 - compare - the builds which are compared to the reference.
1260 - data: Specify the sources, jobs and builds, providing data for generating
1262 - filter: Filter based on tags applied on the input data, if "template" is
1263 used, filtering is based on the template.
1264 - parameters: Only these parameters will be put to the output data
1266 - nr-of-tests-shown: Number of the best and the worst tests presented in the
1267 table. Use 0 (zero) to present all tests.
1275 title: "Performance comparison"
1276 algorithm: "table_performance_comparison"
1277 output-file-ext: ".csv"
1278 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/vpp_performance_comparison"
1280 title: "csit-vpp-perf-1801-all - 1"
1282 csit-vpp-perf-1801-all:
1286 title: "csit-vpp-perf-1801-all - 2"
1288 csit-vpp-perf-1801-all:
1292 "vpp-perf-comparison"
1298 nr-of-tests-shown: 20
1301 Advanced data analytics
1302 ```````````````````````
1304 In the future advanced data analytics (ADA) will be added to analyze the
1305 telemetry data collected from SUT telemetry sources and correlate it to
1306 performance test results.
1310 - describe the concept of ADA.
1311 - add specification.
1317 Generates the plots and tables according to the report models per
1318 specification file. The elements are generated using algorithms and data
1319 specified in their models.
1325 - tables are generated by algorithms implemented in PAL, the model includes the
1326 algorithm and all necessary information.
1327 - output format: csv
1328 - generated tables are stored in specified directories and linked to .rst
1335 - `plot.ly <https://plot.ly/>`_ is currently used to generate plots, the model
1336 includes the type of plot and all the necessary information to render it.
1337 - output format: html.
1338 - generated plots are stored in specified directories and linked to .rst files.
1344 Report is generated using Sphinx and Read_the_Docs template. PAL generates html
1345 and pdf formats. It is possible to define the content of the report by
1346 specifying the version (TODO: define the names and content of versions).
1352 1. Read the specification.
1353 2. Read the input data.
1354 3. Process the input data.
1355 4. For element (plot, table, file) defined in specification:
1357 a. Get the data needed to construct the element using a filter.
1358 b. Generate the element.
1359 c. Store the element.
1361 5. Generate the report.
1362 6. Store the report (Nexus).
1364 The process is model driven. The elements' models (tables, plots, files
1365 and report itself) are defined in the specification file. Script reads
1366 the elements' models from specification file and generates the elements.
1368 It is easy to add elements to be generated in the report. If a new type
1369 of an element is required, only a new algorithm needs to be implemented
1373 Continuous Performance Measurements and Trending
1374 ------------------------------------------------
1376 Performance analysis and trending execution sequence:
1377 `````````````````````````````````````````````````````
1379 CSIT PA runs performance analysis, change detection and trending using specified
1380 trend analysis metrics over the rolling window of last <N> sets of historical
1381 measurement data. PA is defined as follows:
1385 #. By PT job at its completion.
1386 #. Manually from Jenkins UI.
1388 #. Download and parse archived historical data and the new data:
1390 #. New data from latest PT job is evaluated against the rolling window
1391 of <N> sets of historical data.
1392 #. Download RF output.xml files and compressed archived data.
1393 #. Parse out the data filtering test cases listed in PA specification
1394 (part of CSIT PAL specification file).
1396 #. Calculate trend metrics for the rolling window of <N> sets of historical
1399 #. Calculate quartiles Q1, Q2, Q3.
1400 #. Trim outliers using IQR.
1401 #. Calculate TMA and TMSD.
1402 #. Calculate normal trending range per test case based on TMA and TMSD.
1404 #. Evaluate new test data against trend metrics:
1406 #. If within the range of (TMA +/- 3*TMSD) => Result = Pass,
1408 #. If below the range => Result = Fail, Reason = Regression.
1409 #. If above the range => Result = Pass, Reason = Progression.
1411 #. Generate and publish results
1413 #. Relay evaluation result to job result.
1414 #. Generate a new set of trend analysis summary graphs and drill-down
1417 #. Summary graphs to include measured values with Normal,
1418 Progression and Regression markers. MM shown in the background if
1420 #. Drill-down graphs to include MM, TMA and TMSD.
1422 #. Publish trend analysis graphs in html format on
1423 https://docs.fd.io/csit/master/trending/.
1426 Parameters to specify:
1427 ``````````````````````
1429 *General section - parameters common to all plots:*
1432 - title: The title of this section;
1433 - output-file-type: only ".html" is supported;
1434 - output-file: path where the generated files will be stored.
1440 - input data for plots;
1442 - job to be monitored - the Jenkins job which results are used as input
1444 - builds used for trending plot(s) - specified by a list of build
1445 numbers or by a range of builds defined by the first and the last
1448 - tests to be displayed in the plot defined by a filter;
1449 - list of parameters to extract from the data;
1458 title: "Continuous Performance Trending and Analysis"
1459 output-file-type: ".html"
1460 output-file: "{DIR[STATIC,VPP]}/cpta"
1463 - title: "VPP 1T1C L2 64B Packet Throughput - Trending"
1464 output-file-name: "l2-1t1c-x520"
1465 data: "plot-performance-trending-vpp"
1466 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'"
1469 layout: "plot-cpta-vpp"
1471 - title: "DPDK 4T4C IMIX MRR Trending"
1472 output-file-name: "dpdk-imix-4t4c-xl710"
1473 data: "plot-performance-trending-dpdk"
1474 filter: "'NIC_Intel-XL710' and 'IMIX' and 'MRR' and '4T4C' and 'DPDK'"
1477 layout: "plot-cpta-dpdk"
1482 Performance dashboard tables provide the latest VPP throughput trend, trend
1483 compliance and detected anomalies, all on a per VPP test case basis.
1484 The Dashboard is generated as three tables for 1t1c, 2t2c and 4t4c MRR tests.
1486 At first, the .csv tables are generated (only the table for 1t1c is shown):
1492 title: "Performance trending dashboard"
1493 algorithm: "table_performance_trending_dashboard"
1494 output-file-ext: ".csv"
1495 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c"
1496 data: "plot-performance-trending-all"
1497 filter: "'MRR' and '1T1C'"
1503 - "tests.vpp.perf.l2.10ge2p1x520-eth-l2bdscale1mmaclrn-mrr.tc01-64b-1t1c-eth-l2bdscale1mmaclrn-ndrdisc"
1506 evaluated-window: 14
1507 long-trend-window: 180
1509 Then, html tables stored inside .rst files are generated:
1515 title: "HTML performance trending dashboard 1t1c"
1516 algorithm: "table_performance_trending_dashboard_html"
1517 input-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.csv"
1518 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.rst"
1523 Root Cause Analysis (RCA) by analysing archived performance results – re-analyse
1524 available data for specified:
1526 - range of jobs builds,
1527 - set of specific tests and
1528 - PASS/FAIL criteria to detect performance change.
1530 In addition, PAL generates trending plots to show performance over the specified
1533 Root Cause Analysis - Option 1: Analysing Archived VPP Results
1534 ``````````````````````````````````````````````````````````````
1536 It can be used to speed-up the process, or when the existing data is sufficient.
1537 In this case, PAL uses existing data saved in Nexus, searches for performance
1538 degradations and generates plots to show performance over the specified time
1539 interval for the selected tests.
1544 #. Download and parse archived historical data and the new data.
1545 #. Calculate trend metrics.
1546 #. Find regression / progression.
1547 #. Generate and publish results:
1549 #. Summary graphs to include measured values with Progression and
1551 #. List the DUT build(s) where the anomalies were detected.
1553 CSIT PAL Specification
1554 ''''''''''''''''''''''
1558 - first build (Good); specified by the Jenkins job name and the build
1560 - last build (Bad); specified by the Jenkins job name and the build
1566 - tests of interest; list of tests (full name is used) which results are
1579 List of modules, classes, methods and functions
1580 ```````````````````````````````````````````````
1584 specification_parser.py
1607 input_data_parser.py
1648 Functions implementing algorithms to generate particular types of
1649 tables (called by the function "generate_tables"):
1651 table_performance_improvements
1659 Functions implementing algorithms to generate particular types of
1660 plots (called by the function "generate_plots"):
1661 plot_performance_box
1670 Functions implementing algorithms to generate particular types of
1671 files (called by the function "generate_files"):
1680 Functions implementing algorithms to generate particular types of
1681 report (called by the function "generate_report"):
1682 generate_html_report
1685 Other functions called by the function "generate_report":
1690 PAL functional diagram
1691 ``````````````````````
1699 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
1700 \includegraphics[width=0.90\textwidth]{pal_func_diagram}
1701 \label{fig:pal_func_diagram}
1706 .. figure:: pal_func_diagram.svg
1707 :alt: PAL functional diagram
1711 How to add an element
1712 `````````````````````
1714 Element can be added by adding it's model to the specification file. If
1715 the element is to be generated by an existing algorithm, only it's
1716 parameters must be set.
1718 If a brand new type of element needs to be added, also the algorithm
1719 must be implemented. Element generation algorithms are implemented in
1720 the files with names starting with "generator" prefix. The name of the
1721 function implementing the algorithm and the name of algorithm in the
1722 specification file have to be the same.