aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation_new/generator_CPTA.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-01-07 09:56:41 +0100
committerTibor Frank <tifrank@cisco.com>2019-01-07 11:47:30 +0000
commitd1c1b27d17033799cd586a079820d708cc8a541c (patch)
treed306fba55a884dfae2354f91249d4f252754830e /resources/tools/presentation_new/generator_CPTA.py
parent38e9b40d1472549abe0f3836efc3bcaa408e90a1 (diff)
Trending: Add latest changes to the "new" dir
Change-Id: Ib5d1c9561c5d21f2d72b5c1b643c114f37bacd1a Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation_new/generator_CPTA.py')
-rw-r--r--resources/tools/presentation_new/generator_CPTA.py45
1 files changed, 26 insertions, 19 deletions
diff --git a/resources/tools/presentation_new/generator_CPTA.py b/resources/tools/presentation_new/generator_CPTA.py
index 24dc28c2f7..5d088ca94e 100644
--- a/resources/tools/presentation_new/generator_CPTA.py
+++ b/resources/tools/presentation_new/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()