95694337606146fb6bf53001b0c718c921b4caea
[csit.git] / resources / tools / presentation / doc / pal_lld.rst
1 Presentation and Analytics
2 ==========================
3
4 Overview
5 --------
6
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
9 sub-layers, bottom up:
10
11  - sL1 - Data - input data to be processed:
12
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).
20
21  - sL2 - Data processing
22
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
27      data.
28
29  - sL3 - Data presentation - This layer generates the elements specified in the
30    specification file:
31
32    - Tables: .csv files linked to static .rst files.
33    - Plots: .html files generated using plot.ly linked to static .rst files.
34
35  - sL4 - Report generation - Sphinx generates required formats and versions:
36
37    - formats: html, pdf
38    - versions: minimal, full (TODO: define the names and scope of versions)
39
40 .. only:: latex
41
42     .. raw:: latex
43
44         \begin{figure}[H]
45             \centering
46                 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
47                 \includegraphics[width=0.90\textwidth]{pal_layers}
48                 \label{fig:pal_layers}
49         \end{figure}
50
51 .. only:: html
52
53     .. figure:: pal_layers.svg
54         :alt: PAL Layers
55         :align: center
56
57 Data
58 ----
59
60 Report Specification
61 ````````````````````
62
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:
66
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.
74  - .yaml format.
75
76 Structure of the specification file
77 '''''''''''''''''''''''''''''''''''
78
79 The specification file is organized as a list of dictionaries distinguished by
80 the type:
81
82 ::
83
84     -
85       type: "environment"
86     -
87       type: "configuration"
88     -
89       type: "debug"
90     -
91       type: "static"
92     -
93       type: "input"
94     -
95       type: "output"
96     -
97       type: "table"
98     -
99       type: "plot"
100     -
101       type: "file"
102
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.
106
107 Sections "debug", "table", "file" and "plot" are optional.
108
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.
111
112
113 Section: Environment
114 ''''''''''''''''''''
115
116 This section has the following parts:
117
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
125    environment.
126  - build-dirs - a list of the directories where the results are stored.
127
128 The structure of the section "Environment" is as follows (example):
129
130 ::
131
132     -
133       type: "environment"
134       configuration:
135         # Debug mode:
136         # - Skip:
137         #   - Download of input data files
138         # - Do:
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.
142         CFG[DEBUG]: 0
143
144       paths:
145         # Top level directories:
146         ## Working directory
147         DIR[WORKING]: "_tmp"
148         ## Build directories
149         DIR[BUILD,HTML]: "_build"
150         DIR[BUILD,LATEX]: "_build_latex"
151
152         # Static .rst files
153         DIR[RST]: "../../../docs/report"
154
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"
161
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"
167
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"
174
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"
179
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"
183
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"
187
188       urls:
189         URL[JENKINS,CSIT]: "https://jenkins.fd.io/view/csit/job"
190         URL[JENKINS,HC]: "https://jenkins.fd.io/view/hc2vpp/job"
191
192       make-dirs:
193       # List the directories which are created while preparing the environment.
194       # All directories MUST be defined in "paths" section.
195       - "DIR[WORKING,DATA]"
196       - "DIR[STATIC,VPP]"
197       - "DIR[STATIC,DPDK]"
198       - "DIR[STATIC,ARCH]"
199       - "DIR[BUILD,LATEX]"
200       - "DIR[WORKING,SRC]"
201       - "DIR[WORKING,SRC,STATIC]"
202
203       remove-dirs:
204       # List the directories which are deleted while cleaning the environment.
205       # All directories MUST be defined in "paths" section.
206       #- "DIR[BUILD,HTML]"
207
208       build-dirs:
209       # List the directories where the results (build) is stored.
210       # All directories MUST be defined in "paths" section.
211       - "DIR[BUILD,HTML]"
212       - "DIR[BUILD,LATEX]"
213
214 It is possible to use defined items in the definition of other items, e.g.:
215
216 ::
217
218     DIR[WORKING,DATA]: "{DIR[WORKING]}/data"
219
220 will be automatically changed to
221
222 ::
223
224     DIR[WORKING,DATA]: "_tmp/data"
225
226
227 Section: Configuration
228 ''''''''''''''''''''''
229
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:
232
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.
237
238 The structure of the section "Configuration" is as follows (example):
239
240 ::
241
242     -
243       type: "configuration"
244       data-sets:
245         plot-vpp-throughput-latency:
246           csit-vpp-perf-1710-all:
247           - 11
248           - 12
249           - 13
250           - 14
251           - 15
252           - 16
253           - 17
254           - 18
255           - 19
256           - 20
257         vpp-perf-results:
258           csit-vpp-perf-1710-all:
259           - 20
260           - 23
261       plot-layouts:
262         plot-throughput:
263           xaxis:
264             autorange: True
265             autotick: False
266             fixedrange: False
267             gridcolor: "rgb(238, 238, 238)"
268             linecolor: "rgb(238, 238, 238)"
269             linewidth: 1
270             showgrid: True
271             showline: True
272             showticklabels: True
273             tickcolor: "rgb(238, 238, 238)"
274             tickmode: "linear"
275             title: "Indexed Test Cases"
276             zeroline: False
277           yaxis:
278             gridcolor: "rgb(238, 238, 238)'"
279             hoverformat: ".4s"
280             linecolor: "rgb(238, 238, 238)"
281             linewidth: 1
282             range: []
283             showgrid: True
284             showline: True
285             showticklabels: True
286             tickcolor: "rgb(238, 238, 238)"
287             title: "Packets Per Second [pps]"
288             zeroline: False
289           boxmode: "group"
290           boxgroupgap: 0.5
291           autosize: False
292           margin:
293             t: 50
294             b: 20
295             l: 50
296             r: 20
297           showlegend: True
298           legend:
299             orientation: "h"
300           width: 700
301           height: 1000
302
303 The definitions from this sections are used in the elements, e.g.:
304
305 ::
306
307     -
308       type: "plot"
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"
313       data:
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'"
316       parameters:
317       - "throughput"
318       - "parent"
319       traces:
320         hoverinfo: "x+y"
321         boxpoints: "outliers"
322         whiskerwidth: 0
323       layout:
324         title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
325         layout:
326           "plot-throughput"
327
328
329 Section: Debug mode
330 '''''''''''''''''''
331
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.
334
335 If the debug mode is configured, the "input" section is ignored.
336
337 This section has the following parts:
338
339  - type: "debug" - says that this is the section "debug".
340  - general:
341
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.
345
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.
348
349 The structure of the section "Debug" is as follows (example):
350
351 ::
352
353     -
354       type: "debug"
355       general:
356         input-format: "zip"  # zip or xml
357         extract: "robot-plugin/output.xml"  # Only for zip
358       builds:
359         # The files must be in the directory DIR[WORKING,DATA]
360         csit-dpdk-perf-1707-all:
361         -
362           build: 10
363           file: "csit-dpdk-perf-1707-all__10.xml"
364         -
365           build: 9
366           file: "csit-dpdk-perf-1707-all__9.xml"
367         csit-vpp-functional-1707-ubuntu1604-virl:
368         -
369           build: lastSuccessfulBuild
370           file: "csit-vpp-functional-1707-ubuntu1604-virl-lastSuccessfulBuild.xml"
371         hc2vpp-csit-integration-1707-ubuntu1604:
372         -
373           build: lastSuccessfulBuild
374           file: "hc2vpp-csit-integration-1707-ubuntu1604-lastSuccessfulBuild.xml"
375         csit-vpp-perf-1707-all:
376         -
377           build: 16
378           file: "csit-vpp-perf-1707-all__16__output.xml"
379         -
380           build: 17
381           file: "csit-vpp-perf-1707-all__17__output.xml"
382
383
384 Section: Static
385 '''''''''''''''
386
387 This section defines the static content which is stored in git and will be used
388 as a source to generate the report.
389
390 This section has these parts:
391
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
395    processed.
396
397 ::
398
399     -
400       type: "static"
401       src-path: "{DIR[RST]}"
402       dst-path: "{DIR[WORKING,SRC]}"
403
404
405 Section: Input
406 ''''''''''''''
407
408 This section defines the data used to generate elements. It is mandatory
409 if the debug mode is not used.
410
411 This section has the following parts:
412
413  - type: "input" - says that this section is the "input".
414  - general - parameters common to all builds:
415
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.
423
424  - builds - list of jobs (keys) and numbers of builds which output data will be
425    downloaded.
426
427 The structure of the section "Input" is as follows (example from 17.07 report):
428
429 ::
430
431     -
432       type: "input"  # Ignored in debug mode
433       general:
434         file-name: "robot-plugin.zip"
435         file-format: ".zip"
436         download-path: "{job}/{build}/robot/report/*zip*/{filename}"
437         extract: "robot-plugin/output.xml"
438       builds:
439         csit-vpp-perf-1707-all:
440         - 9
441         - 10
442         - 13
443         - 14
444         - 15
445         - 16
446         - 17
447         - 18
448         - 19
449         - 21
450         - 22
451         csit-dpdk-perf-1707-all:
452         - 1
453         - 2
454         - 3
455         - 4
456         - 5
457         - 6
458         - 7
459         - 8
460         - 9
461         - 10
462         csit-vpp-functional-1707-ubuntu1604-virl:
463         - lastSuccessfulBuild
464         hc2vpp-csit-perf-master-ubuntu1604:
465         - 8
466         - 9
467         hc2vpp-csit-integration-1707-ubuntu1604:
468         - lastSuccessfulBuild
469
470 Section: Output
471 '''''''''''''''
472
473 This section specifies which format(s) will be generated (html, pdf) and which
474 versions will be generated for each format.
475
476 This section has the following parts:
477
478  - type: "output" - says that this section is the "output".
479  - format: html or pdf.
480  - version: defined for each format separately.
481
482 The structure of the section "Output" is as follows (example):
483
484 ::
485
486     -
487       type: "output"
488       format:
489         html:
490         - full
491         pdf:
492         - full
493         - minimal
494
495 TODO: define the names of versions
496
497
498 Content of "minimal" version
499 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
500
501 TODO: define the name and content of this version
502
503
504 Section: Table
505 ''''''''''''''
506
507 This section defines a table to be generated. There can be 0 or more "table"
508 sections.
509
510 This section has the following parts:
511
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
516    algorithm.
517  - template: (optional) a .csv file used as a template while generating the
518    table.
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:
522
523    - title: The title used in the table header.
524    - data: Specification of the data, it has two parts - command and arguments:
525
526      - command:
527
528        - template - take the data from template, arguments:
529
530          - number of column in the template.
531
532        - data - take the data from the input data, arguments:
533
534          - jobs and builds which data will be used.
535
536        - operation - performs an operation with the data already in the table,
537          arguments:
538
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
542            utils.py
543            TODO: Move from utils,py to e.g. operations.py
544          - numbers of columns which data will be used (optional).
545
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.
550
551 The structure of the section "Table" is as follows (example of
552 "table_performance_improvements"):
553
554 ::
555
556     -
557       type: "table"
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"
563       columns:
564       -
565         title: "VPP Functionality"
566         data: "template 1"
567       -
568         title: "Test Name"
569         data: "template 2"
570       -
571         title: "VPP-16.09 mean [Mpps]"
572         data: "template 3"
573       -
574         title: "VPP-17.01 mean [Mpps]"
575         data: "template 4"
576       -
577         title: "VPP-17.04 mean [Mpps]"
578         data: "template 5"
579       -
580         title: "VPP-17.07 mean [Mpps]"
581         data: "data csit-vpp-perf-1707-all mean"
582       -
583         title: "VPP-17.07 stdev [Mpps]"
584         data: "data csit-vpp-perf-1707-all stdev"
585       -
586         title: "17.04 to 17.07 change [%]"
587         data: "operation relative_change 5 4"
588       data:
589         csit-vpp-perf-1707-all:
590         - 9
591         - 10
592         - 13
593         - 14
594         - 15
595         - 16
596         - 17
597         - 18
598         - 19
599         - 21
600       filter: "template"
601       parameters:
602       - "throughput"
603
604 Example of "table_details" which generates "Detailed Test Results - VPP
605 Performance Results":
606
607 ::
608
609     -
610       type: "table"
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"
615       columns:
616       -
617         title: "Name"
618         data: "data test_name"
619       -
620         title: "Documentation"
621         data: "data test_documentation"
622       -
623         title: "Status"
624         data: "data test_msg"
625       data:
626         csit-vpp-perf-1707-all:
627         - 17
628       filter: "all"
629       parameters:
630       - "parent"
631       - "doc"
632       - "msg"
633
634 Example of "table_details" which generates "Test configuration - VPP Performance
635 Test Configs":
636
637 ::
638
639     -
640       type: "table"
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"
645       columns:
646       -
647         title: "Name"
648         data: "data name"
649       -
650         title: "VPP API Test (VAT) Commands History - Commands Used Per Test Case"
651         data: "data show-run"
652       data:
653         csit-vpp-perf-1707-all:
654         - 17
655       filter: "all"
656       parameters:
657       - "parent"
658       - "name"
659       - "show-run"
660
661
662 Section: Plot
663 '''''''''''''
664
665 This section defines a plot to be generated. There can be 0 or more "plot"
666 sections.
667
668 This section has these parts:
669
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
672    section "layout".
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.
677    For example:
678
679    - traces
680    - layout
681
682    - These parameters are transparently passed to plot.ly.
683
684  - data: Specify the jobs and numbers of builds which data is used to generate
685    the plot.
686  - filter: filter applied on the input data.
687  - parameters: Only these parameters will be put to the output data structure.
688
689 The structure of the section "Plot" is as follows (example of a plot showing
690 throughput in a chart box-with-whiskers):
691
692 ::
693
694     -
695       type: "plot"
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"
700       data:
701         csit-vpp-perf-1707-all:
702         - 9
703         - 10
704         - 13
705         - 14
706         - 15
707         - 16
708         - 17
709         - 18
710         - 19
711         - 21
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'"
715       parameters:
716       - "throughput"
717       - "parent"
718       traces:
719         hoverinfo: "x+y"
720         boxpoints: "outliers"
721         whiskerwidth: 0
722       layout:
723         title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
724         xaxis:
725           autorange: True
726           autotick: False
727           fixedrange: False
728           gridcolor: "rgb(238, 238, 238)"
729           linecolor: "rgb(238, 238, 238)"
730           linewidth: 1
731           showgrid: True
732           showline: True
733           showticklabels: True
734           tickcolor: "rgb(238, 238, 238)"
735           tickmode: "linear"
736           title: "Indexed Test Cases"
737           zeroline: False
738         yaxis:
739           gridcolor: "rgb(238, 238, 238)'"
740           hoverformat: ".4s"
741           linecolor: "rgb(238, 238, 238)"
742           linewidth: 1
743           range: []
744           showgrid: True
745           showline: True
746           showticklabels: True
747           tickcolor: "rgb(238, 238, 238)"
748           title: "Packets Per Second [pps]"
749           zeroline: False
750         boxmode: "group"
751         boxgroupgap: 0.5
752         autosize: False
753         margin:
754           t: 50
755           b: 20
756           l: 50
757           r: 20
758         showlegend: True
759         legend:
760           orientation: "h"
761         width: 700
762         height: 1000
763
764 The structure of the section "Plot" is as follows (example of a plot showing
765 latency in a box chart):
766
767 ::
768
769     -
770       type: "plot"
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"
775       data:
776         csit-vpp-perf-1707-all:
777         - 9
778         - 10
779         - 13
780         - 14
781         - 15
782         - 16
783         - 17
784         - 18
785         - 19
786         - 21
787       filter: "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
788       parameters:
789       - "latency"
790       - "parent"
791       traces:
792         boxmean: False
793       layout:
794         title: "64B-1t1c-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
795         xaxis:
796           autorange: True
797           autotick: False
798           fixedrange: False
799           gridcolor: "rgb(238, 238, 238)"
800           linecolor: "rgb(238, 238, 238)"
801           linewidth: 1
802           showgrid: True
803           showline: True
804           showticklabels: True
805           tickcolor: "rgb(238, 238, 238)"
806           tickmode: "linear"
807           title: "Indexed Test Cases"
808           zeroline: False
809         yaxis:
810           gridcolor: "rgb(238, 238, 238)'"
811           hoverformat: ""
812           linecolor: "rgb(238, 238, 238)"
813           linewidth: 1
814           range: []
815           showgrid: True
816           showline: True
817           showticklabels: True
818           tickcolor: "rgb(238, 238, 238)"
819           title: "Latency min/avg/max [uSec]"
820           zeroline: False
821         boxmode: "group"
822         boxgroupgap: 0.5
823         autosize: False
824         margin:
825           t: 50
826           b: 20
827           l: 50
828           r: 20
829         showlegend: True
830         legend:
831           orientation: "h"
832         width: 700
833         height: 1000
834
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"):
838
839 ::
840
841     -
842       type: "plot"
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"
847       data:
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'"
852       parameters:
853       - "result"
854       - "name"
855       traces:
856         hoverinfo: "x+y"
857         boxpoints: "outliers"
858         whiskerwidth: 0
859       layout:
860         title: "VPP HTTP Server Performance"
861         layout:
862           "plot-cps"
863
864
865 Section: file
866 '''''''''''''
867
868 This section defines a file to be generated. There can be 0 or more "file"
869 sections.
870
871 This section has the following parts:
872
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
877    algorithm.
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.
888
889 The structure of the section "file" is as follows (example):
890
891 ::
892
893     -
894       type: "file"
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]}"
901       data:
902         csit-vpp-perf-1707-all:
903         - 22
904       filter: "all"
905       parameters:
906       - "name"
907       - "doc"
908       - "level"
909       data-start-level: 2  # 0, 1, 2, ...
910       chapters-start-level: 2  # 0, 1, 2, ...
911
912
913 Static content
914 ``````````````
915
916  - Manually created / edited files.
917  - .rst files, static .csv files, static pictures (.svg), ...
918  - Stored in CSIT git repository.
919
920 No more details about the static content in this document.
921
922
923 Data to process
924 ```````````````
925
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.
929
930
931 Data processing
932 ---------------
933
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
936 further processing.
937
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.
941
942 The parsed data are stored as the multi-indexed pandas.Series data type. Its
943 structure is as follows:
944
945 ::
946
947     <job name>
948       <build>
949         <metadata>
950         <suites>
951         <tests>
952
953 "job name", "build", "metadata", "suites", "tests" are indexes to access the
954 data. For example:
955
956 ::
957
958     data =
959
960     job 1 name:
961       build 1:
962         metadata: metadata
963         suites: suites
964         tests: tests
965       ...
966       build N:
967         metadata: metadata
968         suites: suites
969         tests: tests
970     ...
971     job M name:
972       build 1:
973         metadata: metadata
974         suites: suites
975         tests: tests
976       ...
977       build N:
978         metadata: metadata
979         suites: suites
980         tests: tests
981
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
984 all tests data.
985
986 Data will not be accessible directly using indexes, but using getters and
987 filters.
988
989 **Structure of metadata:**
990
991 ::
992
993     "metadata": {
994         "version": "VPP version",
995         "job": "Jenkins job name"
996         "build": "Information about the build"
997     },
998
999 **Structure of suites:**
1000
1001 ::
1002
1003     "suites": {
1004         "Suite name 1": {
1005             "doc": "Suite 1 documentation"
1006             "parent": "Suite 1 parent"
1007         }
1008         "Suite name N": {
1009             "doc": "Suite N documentation"
1010             "parent": "Suite N parent"
1011         }
1012
1013 **Structure of tests:**
1014
1015 Performance tests:
1016
1017 ::
1018
1019     "tests": {
1020         "ID": {
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",
1027             "throughput": {
1028                 "value": int,
1029                 "unit": "pps" | "bps" | "percentage"
1030             },
1031             "latency": {
1032                 "direction1": {
1033                     "100": {
1034                         "min": int,
1035                         "avg": int,
1036                         "max": int
1037                     },
1038                     "50": {  # Only for NDR
1039                         "min": int,
1040                         "avg": int,
1041                         "max": int
1042                     },
1043                     "10": {  # Only for NDR
1044                         "min": int,
1045                         "avg": int,
1046                         "max": int
1047                     }
1048                 },
1049                 "direction2": {
1050                     "100": {
1051                         "min": int,
1052                         "avg": int,
1053                         "max": int
1054                     },
1055                     "50": {  # Only for NDR
1056                         "min": int,
1057                         "avg": int,
1058                         "max": int
1059                     },
1060                     "10": {  # Only for NDR
1061                         "min": int,
1062                         "avg": int,
1063                         "max": int
1064                     }
1065                 }
1066             },
1067             "lossTolerance": "lossTolerance"  # Only for PDR
1068             "vat-history": "DUT1 and DUT2 VAT History"
1069             },
1070             "show-run": "Show Run"
1071         },
1072         "ID" {
1073             # next test
1074         }
1075
1076 Functional tests:
1077
1078 ::
1079
1080     "tests": {
1081         "ID": {
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"
1090         },
1091         "ID" {
1092             # next test
1093         }
1094     }
1095
1096 Note: ID is the lowercase full path to the test.
1097
1098
1099 Data filtering
1100 ``````````````
1101
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.
1104
1105 The data filtering is based on:
1106
1107  - job name(s).
1108  - build number(s).
1109  - tag(s).
1110  - required data - only this data is included in the output.
1111
1112 WARNING: The filtering is based on tags, so be careful with tagging.
1113
1114 For example, the element which specification includes:
1115
1116 ::
1117
1118     data:
1119       csit-vpp-perf-1707-all:
1120       - 9
1121       - 10
1122       - 13
1123       - 14
1124       - 15
1125       - 16
1126       - 17
1127       - 18
1128       - 19
1129       - 21
1130     filter:
1131       - "'64B' and 'BASE' and 'NDRDISC' and '1T1C' and ('L2BDMACSTAT' or 'L2BDMACLRN' or 'L2XCFWD') and not 'VHOST'"
1132
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
1135 conditions.
1136
1137 The output data structure for filtered test data is:
1138
1139 ::
1140
1141     - job 1
1142       - build 1
1143         - test 1
1144           - parameter 1
1145           - parameter 2
1146           ...
1147           - parameter n
1148         ...
1149         - test n
1150         ...
1151       ...
1152       - build n
1153     ...
1154     - job n
1155
1156
1157 Data analytics
1158 ``````````````
1159
1160 Data analytics part implements:
1161
1162  - methods to compute statistical data from the filtered input data.
1163  - trending.
1164
1165 Throughput Speedup Analysis - Multi-Core with Multi-Threading
1166 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1167
1168 Throughput Speedup Analysis (TSA) calculates throughput speedup ratios
1169 for tested 1-, 2- and 4-core multi-threaded VPP configurations using the
1170 following formula:
1171
1172 ::
1173
1174                                 N_core_throughput
1175     N_core_throughput_speedup = -----------------
1176                                 1_core_throughput
1177
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.
1181
1182 For better comparison multiple test results' data sets are plotted per
1183 each graph:
1184
1185     - graph type: grouped bars;
1186     - graph X-axis: (testcase index, number of cores);
1187     - graph Y-axis: speedup factor.
1188
1189 Subset of existing performance tests is covered by TSA graphs.
1190
1191 **Model for TSA:**
1192
1193 ::
1194
1195     -
1196       type: "plot"
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"
1201       data:
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'"
1204       parameters:
1205       - "throughput"
1206       - "parent"
1207       - "tags"
1208       layout:
1209         title: "64B-*-(eth|dot1q|dot1ad)-(l2xcbase|l2bdbasemaclrn)-ndrdisc"
1210         layout:
1211           "plot-throughput-speedup-analysis"
1212
1213
1214 Comparison of results from two sets of the same test executions
1215 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1216
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.
1221
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.
1225
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:
1229
1230     - name of the test;
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.
1236
1237 **The model**
1238
1239 The model specifies:
1240
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
1245       algorithm.
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
1251       the table.
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
1255       structure.
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.
1258
1259 *Example:*
1260
1261 ::
1262
1263     -
1264       type: "table"
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"
1269       reference:
1270         title: "csit-vpp-perf-1801-all - 1"
1271         data:
1272           csit-vpp-perf-1801-all:
1273           - 1
1274           - 2
1275       compare:
1276         title: "csit-vpp-perf-1801-all - 2"
1277         data:
1278           csit-vpp-perf-1801-all:
1279           - 1
1280           - 2
1281       data:
1282         "vpp-perf-comparison"
1283       filter: "all"
1284       parameters:
1285       - "name"
1286       - "parent"
1287       - "throughput"
1288       nr-of-tests-shown: 20
1289
1290
1291 Advanced data analytics
1292 ```````````````````````
1293
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.
1297
1298 :TODO:
1299
1300     - describe the concept of ADA.
1301     - add specification.
1302
1303
1304 Data presentation
1305 -----------------
1306
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.
1310
1311
1312 Tables
1313 ``````
1314
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
1319    files.
1320
1321
1322 Plots
1323 `````
1324
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.
1329
1330
1331 Report generation
1332 -----------------
1333
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).
1337
1338
1339 The process
1340 ```````````
1341
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:
1346
1347    a. Get the data needed to construct the element using a filter.
1348    b. Generate the element.
1349    c. Store the element.
1350
1351 5. Generate the report.
1352 6. Store the report (Nexus).
1353
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.
1357
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
1360 and integrated.
1361
1362
1363 Continuous Performance Measurements and Trending
1364 ------------------------------------------------
1365
1366 Performance analysis and trending execution sequence:
1367 `````````````````````````````````````````````````````
1368
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:
1372
1373     #. PA job triggers:
1374
1375         #. By PT job at its completion.
1376         #. Manually from Jenkins UI.
1377
1378     #. Download and parse archived historical data and the new data:
1379
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).
1385
1386     #. Calculate trend metrics for the rolling window of <N> sets of historical
1387        data:
1388
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.
1393
1394     #. Evaluate new test data against trend metrics:
1395
1396         #. If within the range of (TMA +/- 3*TMSD) => Result = Pass,
1397            Reason = Normal.
1398         #. If below the range => Result = Fail, Reason = Regression.
1399         #. If above the range => Result = Pass, Reason = Progression.
1400
1401     #. Generate and publish results
1402
1403         #. Relay evaluation result to job result.
1404         #. Generate a new set of trend analysis summary graphs and drill-down
1405            graphs.
1406
1407             #. Summary graphs to include measured values with Normal,
1408                Progression and Regression markers. MM shown in the background if
1409                possible.
1410             #. Drill-down graphs to include MM, TMA and TMSD.
1411
1412         #. Publish trend analysis graphs in html format on
1413            https://docs.fd.io/csit/master/trending/.
1414
1415
1416 Parameters to specify:
1417 ``````````````````````
1418
1419 *General section - parameters common to all plots:*
1420
1421     - type: "cpta";
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.
1425
1426 *Plots section:*
1427
1428     - plot title;
1429     - output file name;
1430     - input data for plots;
1431
1432         - job to be monitored - the Jenkins job which results are used as input
1433           data for this test;
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
1436           build number;
1437
1438     - tests to be displayed in the plot defined by a filter;
1439     - list of parameters to extract from the data;
1440     - plot layout
1441
1442 *Example:*
1443
1444 ::
1445
1446     -
1447       type: "cpta"
1448       title: "Continuous Performance Trending and Analysis"
1449       output-file-type: ".html"
1450       output-file: "{DIR[STATIC,VPP]}/cpta"
1451       plots:
1452
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'"
1457           parameters:
1458           - "result"
1459           layout: "plot-cpta-vpp"
1460
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'"
1465           parameters:
1466           - "result"
1467           layout: "plot-cpta-dpdk"
1468
1469 The Dashboard
1470 `````````````
1471
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.
1475
1476 At first, the .csv tables are generated (only the table for 1t1c is shown):
1477
1478 ::
1479
1480     -
1481       type: "table"
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'"
1488       parameters:
1489       - "name"
1490       - "parent"
1491       - "result"
1492       ignore-list:
1493       - "tests.vpp.perf.l2.10ge2p1x520-eth-l2bdscale1mmaclrn-mrr.tc01-64b-1t1c-eth-l2bdscale1mmaclrn-ndrdisc"
1494       outlier-const: 1.5
1495       window: 14
1496       evaluated-window: 14
1497       long-trend-window: 180
1498
1499 Then, html tables stored inside .rst files are generated:
1500
1501 ::
1502
1503     -
1504       type: "table"
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"
1509
1510 Root Cause Analysis
1511 -------------------
1512
1513 Root Cause Analysis (RCA) by analysing archived performance results – re-analyse
1514 available data for specified:
1515
1516     - range of jobs builds,
1517     - set of specific tests and
1518     - PASS/FAIL criteria to detect performance change.
1519
1520 In addition, PAL generates trending plots to show performance over the specified
1521 time interval.
1522
1523 Root Cause Analysis - Option 1: Analysing Archived VPP Results
1524 ``````````````````````````````````````````````````````````````
1525
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.
1530
1531 Execution Sequence
1532 ''''''''''''''''''
1533
1534     #. Download and parse archived historical data and the new data.
1535     #. Calculate trend metrics.
1536     #. Find regression / progression.
1537     #. Generate and publish results:
1538
1539         #. Summary graphs to include measured values with Progression and
1540            Regression markers.
1541         #. List the DUT build(s) where the anomalies were detected.
1542
1543 CSIT PAL Specification
1544 ''''''''''''''''''''''
1545
1546     - What to test:
1547
1548         - first build (Good); specified by the Jenkins job name and the build
1549           number
1550         - last build (Bad); specified by the Jenkins job name and the build
1551           number
1552         - step (1..n).
1553
1554     - Data:
1555
1556         - tests of interest; list of tests (full name is used) which results are
1557           used
1558
1559 *Example:*
1560
1561 ::
1562
1563     TODO
1564
1565
1566 API
1567 ---
1568
1569 List of modules, classes, methods and functions
1570 ```````````````````````````````````````````````
1571
1572 ::
1573
1574     specification_parser.py
1575
1576         class Specification
1577
1578             Methods:
1579                 read_specification
1580                 set_input_state
1581                 set_input_file_name
1582
1583             Getters:
1584                 specification
1585                 environment
1586                 debug
1587                 is_debug
1588                 input
1589                 builds
1590                 output
1591                 tables
1592                 plots
1593                 files
1594                 static
1595
1596
1597     input_data_parser.py
1598
1599         class InputData
1600
1601             Methods:
1602                 read_data
1603                 filter_data
1604
1605             Getters:
1606                 data
1607                 metadata
1608                 suites
1609                 tests
1610
1611
1612     environment.py
1613
1614         Functions:
1615             clean_environment
1616
1617         class Environment
1618
1619             Methods:
1620                 set_environment
1621
1622             Getters:
1623                 environment
1624
1625
1626     input_data_files.py
1627
1628         Functions:
1629             download_data_files
1630             unzip_files
1631
1632
1633     generator_tables.py
1634
1635         Functions:
1636             generate_tables
1637
1638         Functions implementing algorithms to generate particular types of
1639         tables (called by the function "generate_tables"):
1640             table_details
1641             table_performance_improvements
1642
1643
1644     generator_plots.py
1645
1646         Functions:
1647             generate_plots
1648
1649         Functions implementing algorithms to generate particular types of
1650         plots (called by the function "generate_plots"):
1651             plot_performance_box
1652             plot_latency_box
1653
1654
1655     generator_files.py
1656
1657         Functions:
1658             generate_files
1659
1660         Functions implementing algorithms to generate particular types of
1661         files (called by the function "generate_files"):
1662             file_test_results
1663
1664
1665     report.py
1666
1667         Functions:
1668             generate_report
1669
1670         Functions implementing algorithms to generate particular types of
1671         report (called by the function "generate_report"):
1672             generate_html_report
1673             generate_pdf_report
1674
1675         Other functions called by the function "generate_report":
1676             archive_input_data
1677             archive_report
1678
1679
1680 PAL functional diagram
1681 ``````````````````````
1682
1683 .. only:: latex
1684
1685     .. raw:: latex
1686
1687         \begin{figure}[H]
1688             \centering
1689                 \graphicspath{{../_tmp/src/csit_framework_documentation/}}
1690                 \includegraphics[width=0.90\textwidth]{pal_func_diagram}
1691                 \label{fig:pal_func_diagram}
1692         \end{figure}
1693
1694 .. only:: html
1695
1696     .. figure:: pal_func_diagram.svg
1697         :alt: PAL functional diagram
1698         :align: center
1699
1700
1701 How to add an element
1702 `````````````````````
1703
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.
1707
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.