aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_CPTA.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-01-03 10:30:30 +0100
committerTibor Frank <tifrank@cisco.com>2019-01-04 15:09:41 +0000
commit6c3d971c8b529d094f7c7355e685ea5ab63904e5 (patch)
tree51f8a5f4ed3e973d8facd8b8866c03ff2b31bd0b /resources/tools/presentation/generator_CPTA.py
parentcebbe0a29e2c6329c54d09a77a64e874703c7d4f (diff)
Trending: Remove unneeded tests from Dashboard
Change-Id: I0f57735bcc578b42994721ca88dc1bb60af475de Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_CPTA.py')
-rw-r--r--resources/tools/presentation/generator_CPTA.py45
1 files changed, 26 insertions, 19 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 7d5af3fe2d..f9d42ba069 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -174,28 +174,29 @@ def _generate_trending_traces(in_data, job_name, build_info,
xaxis = list()
for idx in data_x:
date = build_info[job_name][str(idx)][0]
- hover_str = ("date: {0}<br>"
- "value: {1:,}<br>"
- "{2}-ref: {3}<br>"
- "csit-ref: mrr-{4}-build-{5}")
+ hover_str = ("date: {date}<br>"
+ "value: {value:,}<br>"
+ "{sut}-ref: {build}<br>"
+ "csit-ref: mrr-{period}-build-{build_nr}<br>"
+ "testbed: {testbed}")
if "dpdk" in job_name:
hover_text.append(hover_str.format(
- date,
- int(in_data[idx].avg),
- "dpdk",
- build_info[job_name][str(idx)][1].
- rsplit('~', 1)[0],
- "weekly",
- idx))
+ date=date,
+ value=int(in_data[idx].avg),
+ sut="dpdk",
+ build=build_info[job_name][str(idx)][1].rsplit('~', 1)[0],
+ period="weekly",
+ build_nr=idx,
+ testbed=build_info[job_name][str(idx)][2]))
elif "vpp" in job_name:
hover_text.append(hover_str.format(
- date,
- int(in_data[idx].avg),
- "vpp",
- build_info[job_name][str(idx)][1].
- rsplit('~', 1)[0],
- "daily",
- idx))
+ date=date,
+ value=int(in_data[idx].avg),
+ sut="vpp",
+ build=build_info[job_name][str(idx)][1].rsplit('~', 1)[0],
+ period="daily",
+ build_nr=idx,
+ testbed=build_info[job_name][str(idx)][2]))
xaxis.append(datetime(int(date[0:4]), int(date[4:6]), int(date[6:8]),
int(date[9:11]), int(date[12:])))
@@ -433,13 +434,19 @@ def _generate_all_charts(spec, input_data):
# Create "build ID": "date" dict:
build_info = dict()
+ tb_tbl = spec.environment.get("testbeds", None)
for job_name, job_data in builds_dict.items():
if build_info.get(job_name, None) is None:
build_info[job_name] = OrderedDict()
for build in job_data:
+ testbed = ""
+ tb_ip = input_data.metadata(job_name, build).get("testbed", "")
+ if tb_ip and tb_tbl:
+ testbed = tb_tbl.get(tb_ip, "")
build_info[job_name][build] = (
input_data.metadata(job_name, build).get("generated", ""),
- input_data.metadata(job_name, build).get("version", "")
+ input_data.metadata(job_name, build).get("version", ""),
+ testbed
)
work_queue = multiprocessing.JoinableQueue()