1 # Copyright (c) 2024 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/"
51 URL_LOGS = "https://logs.fd.io/vex-yul-rot-jenkins-1/"
53 # URL to the documentation
54 URL_DOC_TRENDING = "https://csit.fd.io/cdocs/methodology/trending/analysis/"
55 URL_DOC_REL_NOTES = "https://csit.fd.io/cdocs/release_notes/current/"
57 # Path and name of the file specifying the HTML layout of the dash
59 MAIN_HTML_LAYOUT_FILE = "base_layout.jinja2"
61 # Path and name of the file specifying the HTML layout of the dash
63 HTML_LAYOUT_FILE = "cdash/templates/dash_layout.jinja2"
68 # Data to be downloaded from the parquets specification file.
69 DATA_SPEC_FILE = "cdash/data/data.yaml"
71 # Path to schemas to use when reading data from the parquet.
72 PATH_TO_SCHEMAS = "cdash/data/_metadata/"
74 # The file with tooltips.
75 TOOLTIP_FILE = "cdash/utils/tooltips.yaml"
77 # Maximal value of TIME_PERIOD for data read from the parquets in days.
78 # Do not change without a good reason.
81 # It defines the time period for data read from the parquets in days from
82 # now back to the past.
83 # TIME_PERIOD = None - means all data (max MAX_TIME_PERIOD days) is read.
84 # TIME_PERIOD = MAX_TIME_PERIOD - is the default value
85 TIME_PERIOD = MAX_TIME_PERIOD # [days]
87 ############################################################################
88 # General, application wide, layout affecting constants.
90 # Add a time delay (in ms) to the spinner being shown
93 # If True, clear all inputs in control panel when button "ADD SELECTED" is
95 CLEAR_ALL_INPUTS = False
97 # The element is disabled.
98 STYLE_DISABLED = {"visibility": "hidden"}
100 # The element is enabled and visible.
101 STYLE_ENABLED = {"visibility": "visible"}
103 # The element is not displayed.
104 STYLE_DONT_DISPLAY = {"display": "none"}
106 # The element is displaed.
107 STYLE_DISPLAY = {"display": "flex"}
109 # Checklist "All" is disabled.
118 # Checklist "All" is enabled, visible and unchecked.
127 # Placeholder for any element in the layout.
128 PLACEHOLDER = html.Nobr("")
130 # List of drivers used in CSIT.
131 DRIVERS = ("avf", "af-xdp", "rdma", "dpdk", "mlx5")
133 # Labels for input elements (dropdowns, ...).
136 "container_memif": "LXC/DRC Container Memif",
137 "crypto": "IPSec IPv4 Routing",
139 "ip4": "IPv4 Routing",
140 "ip4_tunnels": "IPv4 Tunnels",
141 "ip6": "IPv6 Routing",
142 "ip6_tunnels": "IPv6 Tunnels",
143 "l2": "L2 Ethernet Switching",
144 "lb": "Load Balancer",
145 "srv6": "SRv6 Routing",
146 "vm_vhost": "VMs vhost-user",
147 "nfv_density.dcr_memif.chain_ipsec": "CNF Service Chains Routing IPSec",
148 "nfv_density.vm_vhost.chain_dot1qip4vxlan":"VNF Service Chains Tunnels",
149 "nfv_density.vm_vhost.chain": "VNF Service Chains Routing",
150 "nfv_density.dcr_memif.pipeline": "CNF Service Pipelines Routing",
151 "nfv_density.dcr_memif.chain": "CNF Service Chains Routing",
152 "hoststack": "Hoststack",
154 "l2bd": "L2 Bridge Domain",
155 "crypto.ethip4": "IPSec IPv4 Routing",
156 "crypto.ethip6": "IPSec IPv6 Routing",
157 "interfaces": "Interfaces",
158 "ip4_tunnels.lisp": "IPv4 Tunnels LISP",
159 "ip6_tunnels.lisp": "IPv6 Tunnels LISP",
160 "l2patch": "L2 Patch",
161 "l2xc": "L2 Cross Connect",
162 "vm_vhost.ethip4": "VMs vhost-user IPv4 Routing",
163 "vm_vhost.ethip6": "VMs vhost-user IPv6 Routing"
168 "background-color": "#d2ebf5",
169 "border-color": "#bce1f1",
173 ############################################################################
174 # General, normalization constants.
176 NORM_FREQUENCY = 2.0 # [GHz]
177 FREQUENCY = { # [GHz]
195 ############################################################################
196 # General, plots and tables constants.
199 "#1A1110", "#DA2647", "#214FC6", "#01786F", "#BD8260", "#FFD12A",
200 "#A6E7FF", "#738276", "#C95A49", "#FC5A8D", "#CEC8EF", "#391285",
201 "#6F2DA8", "#FF878D", "#45A27D", "#FFD0B9", "#FD5240", "#DB91EF",
202 "#44D7A8", "#4F86F7", "#84DE02", "#FFCFF1", "#614051"
205 # Trending, anomalies.
221 TICK_TEXT_TPUT = ["Regression", "Normal", "Progression"]
232 TICK_TEXT_LAT = ["Progression", "Normal", "Regression"]
234 # Access to the results.
236 "mrr": "result_receive_rate_rate_avg",
237 "ndr": "result_ndr_lower_rate_value",
238 "pdr": "result_pdr_lower_rate_value",
239 "mrr-bandwidth": "result_receive_rate_bandwidth_avg",
240 "ndr-bandwidth": "result_ndr_lower_bandwidth_value",
241 "pdr-bandwidth": "result_pdr_lower_bandwidth_value",
242 "latency": "result_latency_forward_pdr_50_avg",
243 "hoststack-cps": "result_rate_value",
244 "hoststack-rps": "result_rate_value",
245 "hoststack-cps-bandwidth": "result_bandwidth_value",
246 "hoststack-rps-bandwidth": "result_bandwidth_value",
247 "hoststack-bps": "result_bandwidth_value",
248 "hoststack-latency": "result_latency_value",
249 "soak": "result_critical_rate_lower_rate_value",
250 "soak-bandwidth": "result_critical_rate_lower_bandwidth_value"
254 "mrr": "result_receive_rate_rate_values",
255 "ndr": "result_ndr_lower_rate_value",
256 "pdr": "result_pdr_lower_rate_value",
257 "mrr-bandwidth": "result_receive_rate_bandwidth_avg",
258 "ndr-bandwidth": "result_ndr_lower_bandwidth_value",
259 "pdr-bandwidth": "result_pdr_lower_bandwidth_value",
260 "latency": "result_latency_forward_pdr_50_avg",
261 "hoststack-cps": "result_rate_value",
262 "hoststack-rps": "result_rate_value",
263 "hoststack-cps-bandwidth": "result_bandwidth_value",
264 "hoststack-rps-bandwidth": "result_bandwidth_value",
265 "hoststack-bps": "result_bandwidth_value",
266 "hoststack-latency": "result_latency_value",
267 "soak": "result_critical_rate_lower_rate_value",
268 "soak-bandwidth": "result_critical_rate_lower_bandwidth_value"
272 "mrr": "result_receive_rate_rate_unit",
273 "ndr": "result_ndr_lower_rate_unit",
274 "pdr": "result_pdr_lower_rate_unit",
275 "mrr-bandwidth": "result_receive_rate_bandwidth_unit",
276 "ndr-bandwidth": "result_ndr_lower_bandwidth_unit",
277 "pdr-bandwidth": "result_pdr_lower_bandwidth_unit",
278 "latency": "result_latency_forward_pdr_50_unit",
279 "hoststack-cps": "result_rate_unit",
280 "hoststack-rps": "result_rate_unit",
281 "hoststack-cps-bandwidth": "result_bandwidth_unit",
282 "hoststack-rps-bandwidth": "result_bandwidth_unit",
283 "hoststack-bps": "result_bandwidth_unit",
284 "hoststack-latency": "result_latency_unit",
285 "soak": "result_critical_rate_lower_rate_unit",
286 "soak-bandwidth": "result_critical_rate_lower_bandwidth_unit"
289 TESTS_WITH_BANDWIDTH = (
297 TESTS_WITH_LATENCY = (
304 LAT_HDRH = ( # Do not change the order
305 "result_latency_forward_pdr_0_hdrh",
306 "result_latency_reverse_pdr_0_hdrh",
307 "result_latency_forward_pdr_10_hdrh",
308 "result_latency_reverse_pdr_10_hdrh",
309 "result_latency_forward_pdr_50_hdrh",
310 "result_latency_reverse_pdr_50_hdrh",
311 "result_latency_forward_pdr_90_hdrh",
312 "result_latency_reverse_pdr_90_hdrh",
315 # This value depends on latency stream rate (9001 pps) and duration (5s).
316 # Keep it slightly higher to ensure rounding errors to not remove tick mark.
317 PERCENTILE_MAX = 99.999501
319 GRAPH_LAT_HDRH_DESC = {
320 "result_latency_forward_pdr_0_hdrh": "No-load.",
321 "result_latency_reverse_pdr_0_hdrh": "No-load.",
322 "result_latency_forward_pdr_10_hdrh": "Low-load, 10% PDR.",
323 "result_latency_reverse_pdr_10_hdrh": "Low-load, 10% PDR.",
324 "result_latency_forward_pdr_50_hdrh": "Mid-load, 50% PDR.",
325 "result_latency_reverse_pdr_50_hdrh": "Mid-load, 50% PDR.",
326 "result_latency_forward_pdr_90_hdrh": "High-load, 90% PDR.",
327 "result_latency_reverse_pdr_90_hdrh": "High-load, 90% PDR."
330 # Operators used to filter data in comparison tables.
339 ("datestartswith ", )
342 ############################################################################
346 NEWS_TITLE = "Failures and Anomalies"
348 # The pathname prefix for the application.
349 NEWS_ROUTES_PATHNAME_PREFIX = "/news/"
351 # Time period for regressions and progressions.
352 NEWS_TIME_PERIOD = TIME_PERIOD # [days]
354 # Time periods for summary tables.
355 NEWS_LAST = 1 # [days]
356 NEWS_SHORT = 7 # [days]
357 NEWS_LONG = NEWS_TIME_PERIOD # [days]
359 ############################################################################
363 REPORT_TITLE = "Per Release Performance"
365 # The pathname prefix for the application.
366 REPORT_ROUTES_PATHNAME_PREFIX = "/report/"
368 # Layout of plot.ly graphs.
369 REPORT_GRAPH_LAYOUT_FILE = "cdash/report/layout.yaml"
371 # Default name of downloaded file with selected data.
372 REPORT_DOWNLOAD_FILE_NAME = "iterative_data.csv"
374 ############################################################################
378 COMP_TITLE = "Per Release Performance Comparisons"
380 # The pathname prefix for the application.
381 COMP_ROUTES_PATHNAME_PREFIX = "/comparisons/"
383 # Default name of downloaded file with selected data.
384 COMP_DOWNLOAD_FILE_NAME = "comparison_data.csv"
386 # This parameter specifies the method to use for estimating the percentile.
389 # - averaged_inverted_cdf
390 # - closest_observation
391 # - interpolated_inverted_cdf
397 COMP_PERCENTILE_METHOD = "linear"
399 # Extreme or mild outlier?
402 COMP_OUTLIER_TYPE = OUTLIER_EXTREME
404 ############################################################################
408 STATS_TITLE = "Test Job Statistics"
410 # The pathname prefix for the application.
411 STATS_ROUTES_PATHNAME_PREFIX = "/stats/"
413 # Layout of plot.ly graphs.
414 STATS_GRAPH_LAYOUT_FILE = "cdash/stats/layout.yaml"
416 # The default job displayed when the page is loaded first time.
417 STATS_DEFAULT_JOB = "csit-vpp-perf-mrr-daily-master-2n-icx"
419 # Default name of downloaded file with selected data.
420 STATS_DOWNLOAD_FILE_NAME = "stats.csv"
422 # The width of the bar in the graph in miliseconds.
423 STATS_BAR_WIDTH_DAILY = 1000 * 3600 * 15
424 STATS_BAR_WIDTH_WEEKLY = 1000 * 3600 * 24
426 ############################################################################
430 TREND_TITLE = "Performance Trending"
432 # The pathname prefix for the application.
433 TREND_ROUTES_PATHNAME_PREFIX = "/trending/"
435 # Layout of plot.ly graphs.
436 TREND_GRAPH_LAYOUT_FILE = "cdash/trending/layout.yaml"
438 # Default name of downloaded file with selected data.
439 TREND_DOWNLOAD_FILE_NAME = "trending_data.csv"
440 TELEMETRY_DOWNLOAD_FILE_NAME = "telemetry_data.csv"
442 ############################################################################
446 COVERAGE_TITLE = "Per Release Coverage Data"
448 # The pathname prefix for the application.
449 COVERAGE_ROUTES_PATHNAME_PREFIX = "/coverage/"
451 # Default name of downloaded file with selected data.
452 COVERAGE_DOWNLOAD_FILE_NAME = "coverage_data.csv"
454 ############################################################################
458 SEARCH_TITLE = "Search Tests"
460 # The pathname prefix for the application.
461 SEARCH_ROUTES_PATHNAME_PREFIX = "/search/"
463 # Layout of plot.ly graphs.
464 SEARCH_GRAPH_LAYOUT_FILE = "cdash/search/layout.yaml"
466 # Default name of downloaded file with selected data.
467 SEARCH_DOWNLOAD_FILE_NAME = "search_data.csv"
469 ############################################################################