1 # Copyright (c) 2023 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 """Constants used in CDash.
16 "Constant" means a value that keeps its value since initialization. The value
17 does not need to be hard coded here, but can be read from environment variables.
26 """Constants used in CDash.
29 ############################################################################
30 # General, application wide constants.
33 LOG_LEVEL = logging.INFO
34 LOG_FORMAT = "%(asctime)s: %(levelname)s: %(message)s"
35 LOG_DATE_FORMAT = "%Y/%m/%d %H:%M:%S"
37 # The application title.
41 # The application description.
42 DESCRIPTION = "Performance Dashboard"
44 # External stylesheets.
45 EXTERNAL_STYLESHEETS = ["/static/dist/css/bootstrap.css", ]
48 URL_JENKINS = "https://jenkins.fd.io/job/"
50 # URL to the documentation
51 URL_DOC_TRENDING = "https://csit.fd.io/cdocs/methodology/trending/analysis/"
52 URL_DOC_REL_NOTES = "https://csit.fd.io/cdocs/release_notes/current/"
54 # Path and name of the file specifying the HTML layout of the dash
56 MAIN_HTML_LAYOUT_FILE = "base_layout.jinja2"
58 # Path and name of the file specifying the HTML layout of the dash
60 HTML_LAYOUT_FILE = "cdash/templates/dash_layout.jinja2"
65 # Data to be downloaded from the parquets specification file.
66 DATA_SPEC_FILE = "cdash/data/data.yaml"
68 # Path to schemas to use when reading data from the parquet.
69 PATH_TO_SCHEMAS = "cdash/data/_metadata/"
71 # The file with tooltips.
72 TOOLTIP_FILE = "cdash/utils/tooltips.yaml"
74 # Maximal value of TIME_PERIOD for data read from the parquets in days.
75 # Do not change without a good reason.
78 # It defines the time period for data read from the parquets in days from
79 # now back to the past.
80 # TIME_PERIOD = None - means all data (max MAX_TIME_PERIOD days) is read.
81 # TIME_PERIOD = MAX_TIME_PERIOD - is the default value
82 TIME_PERIOD = MAX_TIME_PERIOD # [days]
84 ############################################################################
85 # General, application wide, layout affecting constants.
87 # Add a time delay (in ms) to the spinner being shown
90 # If True, clear all inputs in control panel when button "ADD SELECTED" is
92 CLEAR_ALL_INPUTS = False
94 # The element is disabled.
95 STYLE_DISABLED = {"visibility": "hidden"}
97 # The element is enabled and visible.
98 STYLE_ENABLED = {"visibility": "visible"}
100 # Checklist "All" is disabled.
109 # Checklist "All" is enabled, visible and unchecked.
118 # Placeholder for any element in the layout.
119 PLACEHOLDER = html.Nobr("")
121 # List of drivers used in CSIT.
122 DRIVERS = ("avf", "af-xdp", "rdma", "dpdk", "mlx5")
124 # Labels for input elements (dropdowns, ...).
127 "container_memif": "LXC/DRC Container Memif",
128 "crypto": "IPSec IPv4 Routing",
130 "ip4": "IPv4 Routing",
131 "ip4_tunnels": "IPv4 Tunnels",
132 "ip6": "IPv6 Routing",
133 "ip6_tunnels": "IPv6 Tunnels",
134 "l2": "L2 Ethernet Switching",
135 "lb": "Load Balancer",
136 "srv6": "SRv6 Routing",
137 "vm_vhost": "VMs vhost-user",
138 "nfv_density.dcr_memif.chain_ipsec": "CNF Service Chains Routing IPSec",
139 "nfv_density.vm_vhost.chain_dot1qip4vxlan":"VNF Service Chains Tunnels",
140 "nfv_density.vm_vhost.chain": "VNF Service Chains Routing",
141 "nfv_density.dcr_memif.pipeline": "CNF Service Pipelines Routing",
142 "nfv_density.dcr_memif.chain": "CNF Service Chains Routing",
143 "hoststack": "Hoststack",
145 "l2bd": "L2 Bridge Domain",
146 "crypto.ethip4": "IPSec IPv4 Routing",
147 "crypto.ethip6": "IPSec IPv6 Routing",
148 "interfaces": "Interfaces",
149 "ip4_tunnels.lisp": "IPv4 Tunnels LISP",
150 "ip6_tunnels.lisp": "IPv6 Tunnels LISP",
151 "l2patch": "L2 Patch",
152 "l2xc": "L2 Cross Connect",
153 "vm_vhost.ethip4": "VMs vhost-user IPv4 Routing",
154 "vm_vhost.ethip6": "VMs vhost-user IPv6 Routing"
159 "background-color": "#d2ebf5",
160 "border-color": "#bce1f1",
164 ############################################################################
165 # General, normalization constants.
167 NORM_FREQUENCY = 2.0 # [GHz]
168 FREQUENCY = { # [GHz]
189 ############################################################################
190 # General, plots and tables constants.
193 "#1A1110", "#DA2647", "#214FC6", "#01786F", "#BD8260", "#FFD12A",
194 "#A6E7FF", "#738276", "#C95A49", "#FC5A8D", "#CEC8EF", "#391285",
195 "#6F2DA8", "#FF878D", "#45A27D", "#FFD0B9", "#FD5240", "#DB91EF",
196 "#44D7A8", "#4F86F7", "#84DE02", "#FFCFF1", "#614051"
199 # Trending, anomalies.
215 TICK_TEXT_TPUT = ["Regression", "Normal", "Progression"]
226 TICK_TEXT_LAT = ["Progression", "Normal", "Regression"]
228 # Access to the results.
230 "mrr": "result_receive_rate_rate_avg",
231 "ndr": "result_ndr_lower_rate_value",
232 "pdr": "result_pdr_lower_rate_value",
233 "mrr-bandwidth": "result_receive_rate_bandwidth_avg",
234 "ndr-bandwidth": "result_ndr_lower_bandwidth_value",
235 "pdr-bandwidth": "result_pdr_lower_bandwidth_value",
236 "latency": "result_latency_forward_pdr_50_avg",
237 "hoststack-cps": "result_rate_value",
238 "hoststack-rps": "result_rate_value",
239 "hoststack-cps-bandwidth": "result_bandwidth_value",
240 "hoststack-rps-bandwidth": "result_bandwidth_value",
241 "hoststack-bps": "result_bandwidth_value",
242 "hoststack-latency": "result_latency_value"
246 "mrr": "result_receive_rate_rate_values",
247 "ndr": "result_ndr_lower_rate_value",
248 "pdr": "result_pdr_lower_rate_value",
249 "latency": "result_latency_forward_pdr_50_avg",
250 "hoststack-cps": "result_rate_value",
251 "hoststack-rps": "result_rate_value",
252 "hoststack-bps": "result_bandwidth_value",
253 "hoststack-latency": "result_latency_value"
257 "mrr": "result_receive_rate_rate_unit",
258 "ndr": "result_ndr_lower_rate_unit",
259 "pdr": "result_pdr_lower_rate_unit",
260 "mrr-bandwidth": "result_receive_rate_bandwidth_unit",
261 "ndr-bandwidth": "result_ndr_lower_bandwidth_unit",
262 "pdr-bandwidth": "result_pdr_lower_bandwidth_unit",
263 "latency": "result_latency_forward_pdr_50_unit",
264 "hoststack-cps": "result_rate_unit",
265 "hoststack-rps": "result_rate_unit",
266 "hoststack-cps-bandwidth": "result_bandwidth_unit",
267 "hoststack-rps-bandwidth": "result_bandwidth_unit",
268 "hoststack-bps": "result_bandwidth_unit",
269 "hoststack-latency": "result_latency_unit"
273 LAT_HDRH = ( # Do not change the order
274 "result_latency_forward_pdr_0_hdrh",
275 "result_latency_reverse_pdr_0_hdrh",
276 "result_latency_forward_pdr_10_hdrh",
277 "result_latency_reverse_pdr_10_hdrh",
278 "result_latency_forward_pdr_50_hdrh",
279 "result_latency_reverse_pdr_50_hdrh",
280 "result_latency_forward_pdr_90_hdrh",
281 "result_latency_reverse_pdr_90_hdrh",
284 # This value depends on latency stream rate (9001 pps) and duration (5s).
285 # Keep it slightly higher to ensure rounding errors to not remove tick mark.
286 PERCENTILE_MAX = 99.999501
288 GRAPH_LAT_HDRH_DESC = {
289 "result_latency_forward_pdr_0_hdrh": "No-load.",
290 "result_latency_reverse_pdr_0_hdrh": "No-load.",
291 "result_latency_forward_pdr_10_hdrh": "Low-load, 10% PDR.",
292 "result_latency_reverse_pdr_10_hdrh": "Low-load, 10% PDR.",
293 "result_latency_forward_pdr_50_hdrh": "Mid-load, 50% PDR.",
294 "result_latency_reverse_pdr_50_hdrh": "Mid-load, 50% PDR.",
295 "result_latency_forward_pdr_90_hdrh": "High-load, 90% PDR.",
296 "result_latency_reverse_pdr_90_hdrh": "High-load, 90% PDR."
299 # Operators used to filter data in comparison tables.
308 ("datestartswith ", )
311 ############################################################################
315 NEWS_TITLE = "Failures and Anomalies"
317 # The pathname prefix for the application.
318 NEWS_ROUTES_PATHNAME_PREFIX = "/news/"
320 # Time period for regressions and progressions.
321 NEWS_TIME_PERIOD = TIME_PERIOD # [days]
323 # Time periods for summary tables.
324 NEWS_LAST = 1 # [days]
325 NEWS_SHORT = 7 # [days]
326 NEWS_LONG = NEWS_TIME_PERIOD # [days]
328 ############################################################################
332 REPORT_TITLE = "Per Release Performance"
334 # The pathname prefix for the application.
335 REPORT_ROUTES_PATHNAME_PREFIX = "/report/"
337 # Layout of plot.ly graphs.
338 REPORT_GRAPH_LAYOUT_FILE = "cdash/report/layout.yaml"
340 # Default name of downloaded file with selected data.
341 REPORT_DOWNLOAD_FILE_NAME = "iterative_data.csv"
343 ############################################################################
347 COMP_TITLE = "Per Release Performance Comparisons"
349 # The pathname prefix for the application.
350 COMP_ROUTES_PATHNAME_PREFIX = "/comparisons/"
352 # Default name of downloaded file with selected data.
353 COMP_DOWNLOAD_FILE_NAME = "comparison_data.csv"
355 ############################################################################
359 STATS_TITLE = "Test Job Statistics"
361 # The pathname prefix for the application.
362 STATS_ROUTES_PATHNAME_PREFIX = "/stats/"
364 # Layout of plot.ly graphs.
365 STATS_GRAPH_LAYOUT_FILE = "cdash/stats/layout.yaml"
367 # The default job displayed when the page is loaded first time.
368 STATS_DEFAULT_JOB = "csit-vpp-perf-mrr-daily-master-2n-icx"
370 # Default name of downloaded file with selected data.
371 STATS_DOWNLOAD_FILE_NAME = "stats.csv"
373 # The width of the bar in the graph in miliseconds.
374 STATS_BAR_WIDTH_DAILY = 1000 * 3600 * 15
375 STATS_BAR_WIDTH_WEEKLY = 1000 * 3600 * 24
377 ############################################################################
381 TREND_TITLE = "Performance Trending"
383 # The pathname prefix for the application.
384 TREND_ROUTES_PATHNAME_PREFIX = "/trending/"
386 # Layout of plot.ly graphs.
387 TREND_GRAPH_LAYOUT_FILE = "cdash/trending/layout.yaml"
389 # Default name of downloaded file with selected data.
390 TREND_DOWNLOAD_FILE_NAME = "trending_data.csv"
391 TELEMETRY_DOWNLOAD_FILE_NAME = "telemetry_data.csv"
393 ############################################################################
397 COVERAGE_TITLE = "Per Release Coverage Data"
399 # The pathname prefix for the application.
400 COVERAGE_ROUTES_PATHNAME_PREFIX = "/coverage/"
402 # Default name of downloaded file with selected data.
403 COVERAGE_DOWNLOAD_FILE_NAME = "coverage_data.csv"
405 ############################################################################