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[JENKINS,HC]: "https://jenkins.fd.io/view/hc2vpp/job"
193 # List the directories which are created while preparing the environment.
194 # All directories MUST be defined in "paths" section.
195 - "DIR[WORKING,DATA]"
201 - "DIR[WORKING,SRC,STATIC]"
204 # List the directories which are deleted while cleaning the environment.
205 # All directories MUST be defined in "paths" section.
209 # List the directories where the results (build) is stored.
210 # All directories MUST be defined in "paths" section.
214 It is possible to use defined items in the definition of other items, e.g.:
218 DIR[WORKING,DATA]: "{DIR[WORKING]}/data"
220 will be automatically changed to
224 DIR[WORKING,DATA]: "_tmp/data"
227 Section: Configuration
228 ''''''''''''''''''''''
230 This section specifies the groups of parameters which are repeatedly used in the
231 elements defined later in the specification file. It has the following parts:
233 - data sets - Specification of data sets used later in element's specifications
234 to define the input data.
235 - plot layouts - Specification of plot layouts used later in plots'
236 specifications to define the plot layout.
238 The structure of the section "Configuration" is as follows (example):
243 type: "configuration"
245 plot-vpp-throughput-latency:
246 csit-vpp-perf-1710-all:
258 csit-vpp-perf-1710-all:
267 gridcolor: "rgb(238, 238, 238)"
268 linecolor: "rgb(238, 238, 238)"
273 tickcolor: "rgb(238, 238, 238)"
275 title: "Indexed Test Cases"
278 gridcolor: "rgb(238, 238, 238)'"
280 linecolor: "rgb(238, 238, 238)"
286 tickcolor: "rgb(238, 238, 238)"
287 title: "Packets Per Second [pps]"
303 The definitions from this sections are used in the elements, e.g.:
309 title: "VPP Performance 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
310 algorithm: "plot_performance_box"
311 output-file-type: ".html"
312 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc"
314 "plot-vpp-throughput-latency"
315 filter: "'64B' and ('BASE' or 'SCALE') and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
321 boxpoints: "outliers"
324 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
332 This section is optional as it configures the debug mode. It is used if one
333 does not want to download input data files and use local files instead.
335 If the debug mode is configured, the "input" section is ignored.
337 This section has the following parts:
339 - type: "debug" - says that this is the section "debug".
342 - input-format - xml or zip.
343 - extract - if "zip" is defined as the input format, this file is extracted
344 from the zip file, otherwise this parameter is ignored.
346 - builds - list of builds from which the data is used. Must include a job
347 name as a key and then a list of builds and their output files.
349 The structure of the section "Debug" is as follows (example):
356 input-format: "zip" # zip or xml
357 extract: "robot-plugin/output.xml" # Only for zip
359 # The files must be in the directory DIR[WORKING,DATA]
360 csit-dpdk-perf-1707-all:
363 file: "csit-dpdk-perf-1707-all__10.xml"
366 file: "csit-dpdk-perf-1707-all__9.xml"
367 csit-vpp-functional-1707-ubuntu1604-virl:
369 build: lastSuccessfulBuild
370 file: "csit-vpp-functional-1707-ubuntu1604-virl-lastSuccessfulBuild.xml"
371 hc2vpp-csit-integration-1707-ubuntu1604:
373 build: lastSuccessfulBuild
374 file: "hc2vpp-csit-integration-1707-ubuntu1604-lastSuccessfulBuild.xml"
375 csit-vpp-perf-1707-all:
378 file: "csit-vpp-perf-1707-all__16__output.xml"
381 file: "csit-vpp-perf-1707-all__17__output.xml"
387 This section defines the static content which is stored in git and will be used
388 as a source to generate the report.
390 This section has these parts:
392 - type: "static" - says that this section is the "static".
393 - src-path - path to the static content.
394 - dst-path - destination path where the static content is copied and then
401 src-path: "{DIR[RST]}"
402 dst-path: "{DIR[WORKING,SRC]}"
408 This section defines the data used to generate elements. It is mandatory
409 if the debug mode is not used.
411 This section has the following parts:
413 - type: "input" - says that this section is the "input".
414 - general - parameters common to all builds:
416 - file-name: file to be downloaded.
417 - file-format: format of the downloaded file, ".zip" or ".xml" are supported.
418 - download-path: path to be added to url pointing to the file, e.g.:
419 "{job}/{build}/robot/report/*zip*/{filename}"; {job}, {build} and
420 {filename} are replaced by proper values defined in this section.
421 - extract: file to be extracted from downloaded zip file, e.g.: "output.xml";
422 if xml file is downloaded, this parameter is ignored.
424 - builds - list of jobs (keys) and numbers of builds which output data will be
427 The structure of the section "Input" is as follows (example from 17.07 report):
432 type: "input" # Ignored in debug mode
434 file-name: "robot-plugin.zip"
436 download-path: "{job}/{build}/robot/report/*zip*/{filename}"
437 extract: "robot-plugin/output.xml"
439 csit-vpp-perf-1707-all:
451 csit-dpdk-perf-1707-all:
462 csit-vpp-functional-1707-ubuntu1604-virl:
463 - lastSuccessfulBuild
464 hc2vpp-csit-perf-master-ubuntu1604:
467 hc2vpp-csit-integration-1707-ubuntu1604:
468 - lastSuccessfulBuild
473 This section specifies which format(s) will be generated (html, pdf) and which
474 versions will be generated for each format.
476 This section has the following parts:
478 - type: "output" - says that this section is the "output".
479 - format: html or pdf.
480 - version: defined for each format separately.
482 The structure of the section "Output" is as follows (example):
495 TODO: define the names of versions
498 Content of "minimal" version
499 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
501 TODO: define the name and content of this version
507 This section defines a table to be generated. There can be 0 or more "table"
510 This section has the following parts:
512 - type: "table" - says that this section defines a table.
513 - title: Title of the table.
514 - algorithm: Algorithm which is used to generate the table. The other
515 parameters in this section must provide all information needed by the used
517 - template: (optional) a .csv file used as a template while generating the
519 - output-file-ext: extension of the output file.
520 - output-file: file which the table will be written to.
521 - columns: specification of table columns:
523 - title: The title used in the table header.
524 - data: Specification of the data, it has two parts - command and arguments:
528 - template - take the data from template, arguments:
530 - number of column in the template.
532 - data - take the data from the input data, arguments:
534 - jobs and builds which data will be used.
536 - operation - performs an operation with the data already in the table,
539 - operation to be done, e.g.: mean, stdev, relative_change (compute
540 the relative change between two columns) and display number of data
541 samples ~= number of test jobs. The operations are implemented in the
543 TODO: Move from utils,py to e.g. operations.py
544 - numbers of columns which data will be used (optional).
546 - data: Specify the jobs and builds which data is used to generate the table.
547 - filter: filter based on tags applied on the input data, if "template" is
548 used, filtering is based on the template.
549 - parameters: Only these parameters will be put to the output data structure.
551 The structure of the section "Table" is as follows (example of
552 "table_performance_improvements"):
558 title: "Performance improvements"
559 algorithm: "table_performance_improvements"
560 template: "{DIR[DTR,PERF,VPP,IMPRV]}/tmpl_performance_improvements.csv"
561 output-file-ext: ".csv"
562 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/performance_improvements"
565 title: "VPP Functionality"
571 title: "VPP-16.09 mean [Mpps]"
574 title: "VPP-17.01 mean [Mpps]"
577 title: "VPP-17.04 mean [Mpps]"
580 title: "VPP-17.07 mean [Mpps]"
581 data: "data csit-vpp-perf-1707-all mean"
583 title: "VPP-17.07 stdev [Mpps]"
584 data: "data csit-vpp-perf-1707-all stdev"
586 title: "17.04 to 17.07 change [%]"
587 data: "operation relative_change 5 4"
589 csit-vpp-perf-1707-all:
604 Example of "table_details" which generates "Detailed Test Results - VPP
605 Performance Results":
611 title: "Detailed Test Results - VPP Performance Results"
612 algorithm: "table_details"
613 output-file-ext: ".csv"
614 output-file: "{DIR[WORKING]}/vpp_performance_results"
618 data: "data test_name"
620 title: "Documentation"
621 data: "data test_documentation"
624 data: "data test_msg"
626 csit-vpp-perf-1707-all:
634 Example of "table_details" which generates "Test configuration - VPP Performance
641 title: "Test configuration - VPP Performance Test Configs"
642 algorithm: "table_details"
643 output-file-ext: ".csv"
644 output-file: "{DIR[WORKING]}/vpp_test_configuration"
650 title: "VPP API Test (VAT) Commands History - Commands Used Per Test Case"
651 data: "data show-run"
653 csit-vpp-perf-1707-all:
665 This section defines a plot to be generated. There can be 0 or more "plot"
668 This section has these parts:
670 - type: "plot" - says that this section defines a plot.
671 - title: Plot title used in the logs. Title which is displayed is in the
673 - output-file-type: format of the output file.
674 - output-file: file which the plot will be written to.
675 - algorithm: Algorithm used to generate the plot. The other parameters in this
676 section must provide all information needed by plot.ly to generate the plot.
682 - These parameters are transparently passed to plot.ly.
684 - data: Specify the jobs and numbers of builds which data is used to generate
686 - filter: filter applied on the input data.
687 - parameters: Only these parameters will be put to the output data structure.
689 The structure of the section "Plot" is as follows (example of a plot showing
690 throughput in a chart box-with-whiskers):
696 title: "VPP Performance 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
697 algorithm: "plot_performance_box"
698 output-file-type: ".html"
699 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc"
701 csit-vpp-perf-1707-all:
712 # Keep this formatting, the filter is enclosed with " (quotation mark) and
713 # each tag is enclosed with ' (apostrophe).
714 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
720 boxpoints: "outliers"
723 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
728 gridcolor: "rgb(238, 238, 238)"
729 linecolor: "rgb(238, 238, 238)"
734 tickcolor: "rgb(238, 238, 238)"
736 title: "Indexed Test Cases"
739 gridcolor: "rgb(238, 238, 238)'"
741 linecolor: "rgb(238, 238, 238)"
747 tickcolor: "rgb(238, 238, 238)"
748 title: "Packets Per Second [pps]"
764 The structure of the section "Plot" is as follows (example of a plot showing
765 latency in a box chart):
771 title: "VPP Latency 64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
772 algorithm: "plot_latency_box"
773 output-file-type: ".html"
774 output-file: "{DIR[STATIC,VPP]}/64B-1t1c-l2-sel1-ndrdisc-lat50"
776 csit-vpp-perf-1707-all:
787 filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
794 title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
799 gridcolor: "rgb(238, 238, 238)"
800 linecolor: "rgb(238, 238, 238)"
805 tickcolor: "rgb(238, 238, 238)"
807 title: "Indexed Test Cases"
810 gridcolor: "rgb(238, 238, 238)'"
812 linecolor: "rgb(238, 238, 238)"
818 tickcolor: "rgb(238, 238, 238)"
819 title: "Latency min/avg/max [uSec]"
835 The structure of the section "Plot" is as follows (example of a plot showing
836 VPP HTTP server performance in a box chart with pre-defined data
837 "plot-vpp-http-server-performance" set and plot layout "plot-cps"):
843 title: "VPP HTTP Server Performance"
844 algorithm: "plot_http_server_perf_box"
845 output-file-type: ".html"
846 output-file: "{DIR[STATIC,VPP]}/http-server-performance-cps"
848 "plot-vpp-httlp-server-performance"
849 # Keep this formatting, the filter is enclosed with " (quotation mark) and
850 # each tag is enclosed with ' (apostrophe).
851 filter: "'HTTP' and 'TCP_CPS'"
857 boxpoints: "outliers"
860 title: "VPP HTTP Server Performance"
868 This section defines a file to be generated. There can be 0 or more "file"
871 This section has the following parts:
873 - type: "file" - says that this section defines a file.
874 - title: Title of the table.
875 - algorithm: Algorithm which is used to generate the file. The other
876 parameters in this section must provide all information needed by the used
878 - output-file-ext: extension of the output file.
879 - output-file: file which the file will be written to.
880 - file-header: The header of the generated .rst file.
881 - dir-tables: The directory with the tables.
882 - data: Specify the jobs and builds which data is used to generate the table.
883 - filter: filter based on tags applied on the input data, if "all" is
884 used, no filtering is done.
885 - parameters: Only these parameters will be put to the output data structure.
886 - chapters: the hierarchy of chapters in the generated file.
887 - start-level: the level of the the top-level chapter.
889 The structure of the section "file" is as follows (example):
895 title: "VPP Performance Results"
896 algorithm: "file_test_results"
897 output-file-ext: ".rst"
898 output-file: "{DIR[DTR,PERF,VPP]}/vpp_performance_results"
899 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"
900 dir-tables: "{DIR[DTR,PERF,VPP]}"
902 csit-vpp-perf-1707-all:
909 data-start-level: 2 # 0, 1, 2, ...
910 chapters-start-level: 2 # 0, 1, 2, ...
916 - Manually created / edited files.
917 - .rst files, static .csv files, static pictures (.svg), ...
918 - Stored in CSIT git repository.
920 No more details about the static content in this document.
926 The PAL processes tests results and other information produced by Jenkins jobs.
927 The data are now stored as robot results in Jenkins (TODO: store the data in
928 nexus) either as .zip and / or .xml files.
934 As the first step, the data are downloaded and stored locally (typically on a
935 Jenkins slave). If .zip files are used, the given .xml files are extracted for
938 Parsing of the .xml files is performed by a class derived from
939 "robot.api.ResultVisitor", only necessary methods are overridden. All and only
940 necessary data is extracted from .xml file and stored in a structured form.
942 The parsed data are stored as the multi-indexed pandas.Series data type. Its
943 structure is as follows:
953 "job name", "build", "metadata", "suites", "tests" are indexes to access the
982 Using indexes data["job 1 name"]["build 1"]["tests"] (e.g.:
983 data["csit-vpp-perf-1704-all"]["17"]["tests"]) we get a list of all tests with
986 Data will not be accessible directly using indexes, but using getters and
989 **Structure of metadata:**
994 "version": "VPP version",
995 "job": "Jenkins job name"
996 "build": "Information about the build"
999 **Structure of suites:**
1005 "doc": "Suite 1 documentation"
1006 "parent": "Suite 1 parent"
1009 "doc": "Suite N documentation"
1010 "parent": "Suite N parent"
1013 **Structure of tests:**
1021 "name": "Test name",
1022 "parent": "Name of the parent of the test",
1023 "doc": "Test documentation"
1024 "msg": "Test message"
1025 "tags": ["tag 1", "tag 2", "tag n"],
1026 "type": "PDR" | "NDR",
1029 "unit": "pps" | "bps" | "percentage"
1038 "50": { # Only for NDR
1043 "10": { # Only for NDR
1055 "50": { # Only for NDR
1060 "10": { # Only for NDR
1067 "lossTolerance": "lossTolerance" # Only for PDR
1068 "vat-history": "DUT1 and DUT2 VAT History"
1070 "show-run": "Show Run"
1082 "name": "Test name",
1083 "parent": "Name of the parent of the test",
1084 "doc": "Test documentation"
1085 "msg": "Test message"
1086 "tags": ["tag 1", "tag 2", "tag n"],
1087 "vat-history": "DUT1 and DUT2 VAT History"
1088 "show-run": "Show Run"
1089 "status": "PASS" | "FAIL"
1096 Note: ID is the lowercase full path to the test.
1102 The first step when generating an element is getting the data needed to
1103 construct the element. The data are filtered from the processed input data.
1105 The data filtering is based on:
1110 - required data - only this data is included in the output.
1112 WARNING: The filtering is based on tags, so be careful with tagging.
1114 For example, the element which specification includes:
1119 csit-vpp-perf-1707-all:
1131 - "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1133 will be constructed using data from the job "csit-vpp-perf-1707-all", for all
1134 listed builds and the tests with the list of tags matching the filter
1137 The output data structure for filtered test data is:
1160 Data analytics part implements:
1162 - methods to compute statistical data from the filtered input data.
1165 Throughput Speedup Analysis - Multi-Core with Multi-Threading
1166 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1168 Throughput Speedup Analysis (TSA) calculates throughput speedup ratios
1169 for tested 1-, 2- and 4-core multi-threaded VPP configurations using the
1175 N_core_throughput_speedup = -----------------
1178 Multi-core throughput speedup ratios are plotted in grouped bar graphs
1179 for throughput tests with 64B/78B frame size, with number of cores on
1180 X-axis and speedup ratio on Y-axis.
1182 For better comparison multiple test results' data sets are plotted per
1185 - graph type: grouped bars;
1186 - graph X-axis: (testcase index, number of cores);
1187 - graph Y-axis: speedup factor.
1189 Subset of existing performance tests is covered by TSA graphs.
1197 title: "TSA: 64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1198 algorithm: "plot_throughput_speedup_analysis"
1199 output-file-type: ".html"
1200 output-file: "{DIR[STATIC,VPP]}/10ge2p1x520-64B-l2-tsa-ndrdisc"
1202 "plot-throughput-speedup-analysis"
1203 filter: "'NIC_Intel-X520-DA2' and '64B' and 'BASE' and 'NDRDISC' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1209 title: "64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1211 "plot-throughput-speedup-analysis"
1214 Comparison of results from two sets of the same test executions
1215 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1217 This algorithm enables comparison of results coming from two sets of the
1218 same test executions. It is used to quantify performance changes across
1219 all tests after test environment changes e.g. Operating System
1220 upgrades/patches, Hardware changes.
1222 It is assumed that each set of test executions includes multiple runs
1223 of the same tests, 10 or more, to verify test results repeatibility and
1224 to yield statistically meaningful results data.
1226 Comparison results are presented in a table with a specified number of
1227 the best and the worst relative changes between the two sets. Following table
1228 columns are defined:
1231 - throughput mean values of the reference set;
1232 - throughput standard deviation of the reference set;
1233 - throughput mean values of the set to compare;
1234 - throughput standard deviation of the set to compare;
1235 - relative change of the mean values.
1239 The model specifies:
1241 - type: "table" - means this section defines a table.
1242 - title: Title of the table.
1243 - algorithm: Algorithm which is used to generate the table. The other
1244 parameters in this section must provide all information needed by the used
1246 - output-file-ext: Extension of the output file.
1247 - output-file: File which the table will be written to.
1248 - reference - the builds which are used as the reference for comparison.
1249 - compare - the builds which are compared to the reference.
1250 - data: Specify the sources, jobs and builds, providing data for generating
1252 - filter: Filter based on tags applied on the input data, if "template" is
1253 used, filtering is based on the template.
1254 - parameters: Only these parameters will be put to the output data
1256 - nr-of-tests-shown: Number of the best and the worst tests presented in the
1257 table. Use 0 (zero) to present all tests.
1265 title: "Performance comparison"
1266 algorithm: "table_perf_comparison"
1267 output-file-ext: ".csv"
1268 output-file: "{DIR[DTR,PERF,VPP,IMPRV]}/vpp_performance_comparison"
1270 title: "csit-vpp-perf-1801-all - 1"
1272 csit-vpp-perf-1801-all:
1276 title: "csit-vpp-perf-1801-all - 2"
1278 csit-vpp-perf-1801-all:
1282 "vpp-perf-comparison"
1288 nr-of-tests-shown: 20
1291 Advanced data analytics
1292 ```````````````````````
1294 In the future advanced data analytics (ADA) will be added to analyze the
1295 telemetry data collected from SUT telemetry sources and correlate it to
1296 performance test results.
1300 - describe the concept of ADA.
1301 - add specification.
1307 Generates the plots and tables according to the report models per
1308 specification file. The elements are generated using algorithms and data
1309 specified in their models.
1315 - tables are generated by algorithms implemented in PAL, the model includes the
1316 algorithm and all necessary information.
1317 - output format: csv
1318 - generated tables are stored in specified directories and linked to .rst
1325 - `plot.ly <https://plot.ly/>`_ is currently used to generate plots, the model
1326 includes the type of plot and all the necessary information to render it.
1327 - output format: html.
1328 - generated plots are stored in specified directories and linked to .rst files.
1334 Report is generated using Sphinx and Read_the_Docs template. PAL generates html
1335 and pdf formats. It is possible to define the content of the report by
1336 specifying the version (TODO: define the names and content of versions).
1342 1. Read the specification.
1343 2. Read the input data.
1344 3. Process the input data.
1345 4. For element (plot, table, file) defined in specification:
1347 a. Get the data needed to construct the element using a filter.
1348 b. Generate the element.
1349 c. Store the element.
1351 5. Generate the report.
1352 6. Store the report (Nexus).
1354 The process is model driven. The elements' models (tables, plots, files
1355 and report itself) are defined in the specification file. Script reads
1356 the elements' models from specification file and generates the elements.
1358 It is easy to add elements to be generated in the report. If a new type
1359 of an element is required, only a new algorithm needs to be implemented
1363 Continuous Performance Measurements and Trending
1364 ------------------------------------------------
1366 Performance analysis and trending execution sequence:
1367 `````````````````````````````````````````````````````
1369 CSIT PA runs performance analysis, change detection and trending using specified
1370 trend analysis metrics over the rolling window of last <N> sets of historical
1371 measurement data. PA is defined as follows:
1375 #. By PT job at its completion.
1376 #. Manually from Jenkins UI.
1378 #. Download and parse archived historical data and the new data:
1380 #. New data from latest PT job is evaluated against the rolling window
1381 of <N> sets of historical data.
1382 #. Download RF output.xml files and compressed archived data.
1383 #. Parse out the data filtering test cases listed in PA specification
1384 (part of CSIT PAL specification file).
1386 #. Calculate trend metrics for the rolling window of <N> sets of historical
1389 #. Calculate quartiles Q1, Q2, Q3.
1390 #. Trim outliers using IQR.
1391 #. Calculate TMA and TMSD.
1392 #. Calculate normal trending range per test case based on TMA and TMSD.
1394 #. Evaluate new test data against trend metrics:
1396 #. If within the range of (TMA +/- 3*TMSD) => Result = Pass,
1398 #. If below the range => Result = Fail, Reason = Regression.
1399 #. If above the range => Result = Pass, Reason = Progression.
1401 #. Generate and publish results
1403 #. Relay evaluation result to job result.
1404 #. Generate a new set of trend analysis summary graphs and drill-down
1407 #. Summary graphs to include measured values with Normal,
1408 Progression and Regression markers. MM shown in the background if
1410 #. Drill-down graphs to include MM, TMA and TMSD.
1412 #. Publish trend analysis graphs in html format on
1413 https://docs.fd.io/csit/master/trending/.
1416 Parameters to specify:
1417 ``````````````````````
1419 *General section - parameters common to all plots:*
1422 - title: The title of this section;
1423 - output-file-type: only ".html" is supported;
1424 - output-file: path where the generated files will be stored.
1430 - input data for plots;
1432 - job to be monitored - the Jenkins job which results are used as input
1434 - builds used for trending plot(s) - specified by a list of build
1435 numbers or by a range of builds defined by the first and the last
1438 - tests to be displayed in the plot defined by a filter;
1439 - list of parameters to extract from the data;
1448 title: "Continuous Performance Trending and Analysis"
1449 output-file-type: ".html"
1450 output-file: "{DIR[STATIC,VPP]}/cpta"
1453 - title: "VPP 1T1C L2 64B Packet Throughput - Trending"
1454 output-file-name: "l2-1t1c-x520"
1455 data: "plot-performance-trending-vpp"
1456 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'"
1459 layout: "plot-cpta-vpp"
1461 - title: "DPDK 4T4C IMIX MRR Trending"
1462 output-file-name: "dpdk-imix-4t4c-xl710"
1463 data: "plot-performance-trending-dpdk"
1464 filter: "'NIC_Intel-XL710' and 'IMIX' and 'MRR' and '4T4C' and 'DPDK'"
1467 layout: "plot-cpta-dpdk"
1472 Performance dashboard tables provide the latest VPP throughput trend, trend
1473 compliance and detected anomalies, all on a per VPP test case basis.
1474 The Dashboard is generated as three tables for 1t1c, 2t2c and 4t4c MRR tests.
1476 At first, the .csv tables are generated (only the table for 1t1c is shown):
1482 title: "Performance trending dashboard"
1483 algorithm: "table_perf_trending_dash"
1484 output-file-ext: ".csv"
1485 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c"
1486 data: "plot-performance-trending-all"
1487 filter: "'MRR' and '1T1C'"
1493 - "tests.vpp.perf.l2.10ge2p1x520-eth-l2bdscale1mmaclrn-mrr.tc01-64b-1t1c-eth-l2bdscale1mmaclrn-ndrdisc"
1496 evaluated-window: 14
1497 long-trend-window: 180
1499 Then, html tables stored inside .rst files are generated:
1505 title: "HTML performance trending dashboard 1t1c"
1506 algorithm: "table_perf_trending_dash_html"
1507 input-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.csv"
1508 output-file: "{DIR[STATIC,VPP]}/performance-trending-dashboard-1t1c.rst"
1513 Root Cause Analysis (RCA) by analysing archived performance results – re-analyse
1514 available data for specified:
1516 - range of jobs builds,
1517 - set of specific tests and
1518 - PASS/FAIL criteria to detect performance change.
1520 In addition, PAL generates trending plots to show performance over the specified
1523 Root Cause Analysis - Option 1: Analysing Archived VPP Results
1524 ``````````````````````````````````````````````````````````````
1526 It can be used to speed-up the process, or when the existing data is sufficient.
1527 In this case, PAL uses existing data saved in Nexus, searches for performance
1528 degradations and generates plots to show performance over the specified time
1529 interval for the selected tests.
1534 #. Download and parse archived historical data and the new data.
1535 #. Calculate trend metrics.
1536 #. Find regression / progression.
1537 #. Generate and publish results:
1539 #. Summary graphs to include measured values with Progression and
1541 #. List the DUT build(s) where the anomalies were detected.
1543 CSIT PAL Specification
1544 ''''''''''''''''''''''
1548 - first build (Good); specified by the Jenkins job name and the build
1550 - last build (Bad); specified by the Jenkins job name and the build
1556 - tests of interest; list of tests (full name is used) which results are
1569 List of modules, classes, methods and functions
1570 ```````````````````````````````````````````````
1574 specification_parser.py
1597 input_data_parser.py
1638 Functions implementing algorithms to generate particular types of
1639 tables (called by the function "generate_tables"):
1641 table_performance_improvements
1649 Functions implementing algorithms to generate particular types of
1650 plots (called by the function "generate_plots"):
1651 plot_performance_box
1660 Functions implementing algorithms to generate particular types of
1661 files (called by the function "generate_files"):
1670 Functions implementing algorithms to generate particular types of
1671 report (called by the function "generate_report"):
1672 generate_html_report
1675 Other functions called by the function "generate_report":
1680 PAL functional diagram
1681 ``````````````````````
1689 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
1690 \includegraphics[width=0.90\textwidth]{pal_func_diagram}
1691 \label{fig:pal_func_diagram}
1696 .. figure:: pal_func_diagram.svg
1697 :alt: PAL functional diagram
1701 How to add an element
1702 `````````````````````
1704 Element can be added by adding it's model to the specification file. If
1705 the element is to be generated by an existing algorithm, only it's
1706 parameters must be set.
1708 If a brand new type of element needs to be added, also the algorithm
1709 must be implemented. Element generation algorithms are implemented in
1710 the files with names starting with "generator" prefix. The name of the
1711 function implementing the algorithm and the name of algorithm in the
1712 specification file have to be the same.