aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-04-15 12:39:40 +0200
committerTibor Frank <tifrank@cisco.com>2018-04-15 12:39:40 +0200
commitf2f19bad6847e315366e5e9ab4952fded0097b1f (patch)
treefdf9859170ce1af056a16e3ef2304ddf895e4267 /resources
parentbe6a64548431c215ba265ee2edc6dc2eb2bff947 (diff)
CSIT-1041: Trending dashboard
Change-Id: I18f06b67af7ce8894bfbddbd70d2a9c1f33435be Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/tools/presentation/generator_CPTA.py31
-rw-r--r--resources/tools/presentation/input_data_parser.py8
-rw-r--r--resources/tools/presentation/pal.py82
-rw-r--r--resources/tools/presentation/specification_CPTA.yaml198
-rw-r--r--resources/tools/presentation/utils.py4
5 files changed, 169 insertions, 154 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 69a8df6afd..e8091c0b8d 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -197,7 +197,7 @@ def _evaluate_results(in_data, trimmed_data, window=10):
return results
-def _generate_trending_traces(in_data, period, moving_win_size=10,
+def _generate_trending_traces(in_data, build_info, period, moving_win_size=10,
fill_missing=True, use_first=False,
show_moving_median=True, name="", color=""):
"""Generate the trending traces:
@@ -206,6 +206,7 @@ def _generate_trending_traces(in_data, period, moving_win_size=10,
- outliers, regress, progress
:param in_data: Full data set.
+ :param build_info: Information about the builds.
:param period: Sampling period.
:param moving_win_size: Window size.
:param fill_missing: If the chosen sample is missing in the full set, its
@@ -215,6 +216,7 @@ def _generate_trending_traces(in_data, period, moving_win_size=10,
:param name: Name of the plot
:param color: Name of the color for the plot.
:type in_data: OrderedDict
+ :type build_info: dict
:type period: int
:type moving_win_size: int
:type fill_missing: bool
@@ -230,8 +232,11 @@ def _generate_trending_traces(in_data, period, moving_win_size=10,
in_data = _select_data(in_data, period,
fill_missing=fill_missing,
use_first=use_first)
-
- data_x = [key for key in in_data.keys()]
+ try:
+ data_x = ["{0}/{1}".format(key, build_info[str(key)][1].split("~")[-1])
+ for key in in_data.keys()]
+ except KeyError:
+ data_x = [key for key in in_data.keys()]
data_y = [val for val in in_data.values()]
data_pd = pd.Series(data_y, index=data_x)
@@ -242,7 +247,10 @@ def _generate_trending_traces(in_data, period, moving_win_size=10,
anomalies = pd.Series()
anomalies_res = list()
for idx, item in enumerate(in_data.items()):
- item_pd = pd.Series([item[1], ], index=[item[0], ])
+ item_pd = pd.Series([item[1], ],
+ index=["{0}/{1}".
+ format(item[0],
+ build_info[str(item[0])][1].split("~")[-1]), ])
if item[0] in outliers.keys():
anomalies = anomalies.append(item_pd)
anomalies_res.append(0.0)
@@ -371,11 +379,13 @@ def _generate_all_charts(spec, input_data):
builds_lst.append(str(build["build"]))
# Get "build ID": "date" dict:
- build_dates = dict()
+ build_info = dict()
for build in builds_lst:
try:
- build_dates[build] = \
- input_data.metadata(job_name, build)["generated"][:14]
+ build_info[build] = (
+ input_data.metadata(job_name, build)["generated"][:14],
+ input_data.metadata(job_name, build)["version"]
+ )
except KeyError:
pass
@@ -383,7 +393,11 @@ def _generate_all_charts(spec, input_data):
csv_table = list()
header = "Build Number:," + ",".join(builds_lst) + '\n'
csv_table.append(header)
- header = "Build Date:," + ",".join(build_dates.values()) + '\n'
+ build_dates = [x[0] for x in build_info.values()]
+ header = "Build Date:," + ",".join(build_dates) + '\n'
+ csv_table.append(header)
+ vpp_versions = [x[1] for x in build_info.values()]
+ header = "VPP Version:," + ",".join(vpp_versions) + '\n'
csv_table.append(header)
results = list()
@@ -430,6 +444,7 @@ def _generate_all_charts(spec, input_data):
test_name = test_name.split('.')[-1]
trace, result = _generate_trending_traces(
test_data,
+ build_info=build_info,
period=period,
moving_win_size=win_size,
fill_missing=True,
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index 7adc9c085b..db63660d43 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -171,7 +171,7 @@ class ExecutionChecker(ResultVisitor):
REGEX_TOLERANCE = re.compile(r'^[\D\d]*LOSS_ACCEPTANCE:\s(\d*\.\d*)\s'
r'[\D\d]*')
- REGEX_VERSION = re.compile(r"(stdout: 'vat# vat# Version:)(\s*)(.*)")
+ REGEX_VERSION = re.compile(r"(return STDOUT Version:\s*)(.*)")
REGEX_TCP = re.compile(r'Total\s(rps|cps|throughput):\s([0-9]*).*$')
@@ -244,9 +244,9 @@ class ExecutionChecker(ResultVisitor):
:returns: Nothing.
"""
- if msg.message.count("stdout: 'vat# vat# Version:"):
+ if msg.message.count("return STDOUT Version:"):
self._version = str(re.search(self.REGEX_VERSION, msg.message).
- group(3))
+ group(2))
self._data["metadata"]["version"] = self._version
self._msg_type = None
@@ -585,7 +585,7 @@ class ExecutionChecker(ResultVisitor):
:type setup_kw: Keyword
:returns: Nothing.
"""
- if setup_kw.name.count("Vpp Show Version Verbose") \
+ if setup_kw.name.count("Show Vpp Version On All Duts") \
and not self._version:
self._msg_type = "setup-version"
setup_kw.messages.visit(self)
diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py
index 98642c898c..aaeacaac15 100644
--- a/resources/tools/presentation/pal.py
+++ b/resources/tools/presentation/pal.py
@@ -87,48 +87,48 @@ def main():
return 1
ret_code = 0
- try:
- env = Environment(spec.environment, args.force)
- env.set_environment()
-
- if spec.is_debug:
- if spec.debug["input-format"] == "zip":
- unzip_files(spec)
- else:
- download_data_files(spec)
-
- prepare_static_content(spec)
-
- data = InputData(spec)
- data.read_data()
-
- generate_tables(spec, data)
- generate_plots(spec, data)
- generate_files(spec, data)
-
- if spec.output["output"] == "report":
- generate_report(args.release, spec)
- logging.info("Successfully finished.")
- elif spec.output["output"] == "CPTA":
- sys.stdout.write(generate_cpta(spec, data))
- logging.info("Successfully finished.")
- else:
- logging.critical("The output '{0}' is not supported.".
- format(spec.output["output"]))
- ret_code = 1
-
- except (KeyError, ValueError, PresentationError) as err:
- logging.info("Finished with an error.")
- logging.critical(str(err))
- ret_code = 1
- except Exception as err:
- logging.info("Finished with an unexpected error.")
- logging.critical(str(err))
+ # try:
+ env = Environment(spec.environment, args.force)
+ env.set_environment()
+
+ if spec.is_debug:
+ if spec.debug["input-format"] == "zip":
+ unzip_files(spec)
+ else:
+ download_data_files(spec)
+
+ prepare_static_content(spec)
+
+ data = InputData(spec)
+ data.read_data()
+
+ generate_tables(spec, data)
+ generate_plots(spec, data)
+ generate_files(spec, data)
+
+ if spec.output["output"] == "report":
+ generate_report(args.release, spec)
+ logging.info("Successfully finished.")
+ elif spec.output["output"] == "CPTA":
+ sys.stdout.write(generate_cpta(spec, data))
+ logging.info("Successfully finished.")
+ else:
+ logging.critical("The output '{0}' is not supported.".
+ format(spec.output["output"]))
ret_code = 1
- finally:
- if spec is not None and not spec.is_debug:
- clean_environment(spec.environment)
- return ret_code
+
+ # except (KeyError, ValueError, PresentationError) as err:
+ # logging.info("Finished with an error.")
+ # logging.critical(str(err))
+ # ret_code = 1
+ # except Exception as err:
+ # logging.info("Finished with an unexpected error.")
+ # logging.critical(str(err))
+ # ret_code = 1
+ # finally:
+ # if spec is not None and not spec.is_debug:
+ # clean_environment(spec.environment)
+ # return ret_code
if __name__ == '__main__':
diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml
index d4317e3f37..2eb31709da 100644
--- a/resources/tools/presentation/specification_CPTA.yaml
+++ b/resources/tools/presentation/specification_CPTA.yaml
@@ -102,7 +102,7 @@
showgrid: True
xaxis:
showticklabels: True
- title: "/csit/job/{job}/$id"
+ title: "csit-vpp-perf-mrr-daily-master/vpp-build"
autorange: True
showgrid: True
gridcolor: "rgb(238, 238, 238)"
@@ -116,7 +116,7 @@
margin:
r: 20
b: 50
- t: 50
+ t: 0
l: 70
legend:
orientation: "h"
@@ -287,8 +287,8 @@
- "result"
periods:
- 1
- - 14
- # # - 60
+ # - 14
+ # - 60
layout: "plot-cpta"
- title: "VPP 2T2C L2 64B Packet Throughput - {period} Trending"
@@ -299,7 +299,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -311,7 +311,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -323,7 +323,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -335,7 +335,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -347,7 +347,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -361,7 +361,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -373,7 +373,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -385,7 +385,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -399,7 +399,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -411,7 +411,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -423,7 +423,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -435,7 +435,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -447,7 +447,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -459,7 +459,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -473,7 +473,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -485,7 +485,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -497,7 +497,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -509,7 +509,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -521,7 +521,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -533,7 +533,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -547,7 +547,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -559,7 +559,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -571,7 +571,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -585,7 +585,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -597,7 +597,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -609,7 +609,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -621,7 +621,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -633,7 +633,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -645,7 +645,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -659,7 +659,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -671,7 +671,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -683,7 +683,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -697,7 +697,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -709,7 +709,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -721,7 +721,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -735,7 +735,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -747,7 +747,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -759,7 +759,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -773,7 +773,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -785,7 +785,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -797,7 +797,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -811,7 +811,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -823,7 +823,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -835,7 +835,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -849,7 +849,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -861,7 +861,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -873,7 +873,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -887,7 +887,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -899,7 +899,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -911,7 +911,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -925,7 +925,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -937,7 +937,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -949,7 +949,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -963,7 +963,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -975,7 +975,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -987,7 +987,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1001,7 +1001,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1013,7 +1013,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1025,7 +1025,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1039,7 +1039,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1051,7 +1051,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1063,7 +1063,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1077,7 +1077,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1089,7 +1089,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1101,7 +1101,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1115,7 +1115,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1127,7 +1127,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1139,7 +1139,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1154,7 +1154,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1166,7 +1166,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1178,7 +1178,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1193,7 +1193,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1205,7 +1205,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1217,7 +1217,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1232,7 +1232,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1244,7 +1244,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1256,7 +1256,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1271,7 +1271,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1283,7 +1283,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1295,7 +1295,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1309,7 +1309,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1321,7 +1321,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1333,7 +1333,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1347,7 +1347,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1359,7 +1359,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1371,7 +1371,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1386,7 +1386,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1398,7 +1398,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1410,7 +1410,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1425,7 +1425,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1437,7 +1437,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1449,7 +1449,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1463,7 +1463,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1475,7 +1475,7 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
@@ -1487,6 +1487,6 @@
- "result"
periods:
- 1
- - 14
+ # - 14
# - 60
layout: "plot-cpta"
diff --git a/resources/tools/presentation/utils.py b/resources/tools/presentation/utils.py
index 8365bfad5c..0bf78f09bf 100644
--- a/resources/tools/presentation/utils.py
+++ b/resources/tools/presentation/utils.py
@@ -187,8 +187,8 @@ def execute_command(cmd):
stdout, stderr = proc.communicate()
- logging.info(stdout)
- logging.info(stderr)
+ logging.debug(stdout)
+ logging.debug(stderr)
if proc.returncode != 0:
logging.error(" Command execution failed.")