aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-10-10 11:52:22 +0200
committerTibor Frank <tifrank@cisco.com>2019-10-11 09:57:09 +0000
commit5d49bc99a61bbc59b2cd7c0b58e577c3f9a46365 (patch)
tree09689f4f1860d141d4d328ef6429b4f74bf67b6c
parentddf4a20379ac8c9bf928d10286bc6bf61bff9dcc (diff)
Trending: Generate email body for regressions and progressions
Change-Id: Iee652fc48b574b7866d5e7f0b7b927f96de3d25f Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--resources/tools/presentation/generator_CPTA.py6
-rw-r--r--resources/tools/presentation/generator_alerts.py44
-rw-r--r--resources/tools/presentation/specification_CPTA.yaml18
3 files changed, 52 insertions, 16 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 580b8f033b..f57757f451 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -602,6 +602,12 @@ def _generate_all_charts(spec, input_data):
if classification == "regression" or \
classification == "outlier":
result = "FAIL"
+ file_name = "{0}-progressions-{1}.txt".\
+ format(spec.cpta["output-file"], job_name)
+ with open(file_name, 'w') as txt_file:
+ for test_name, classification in job_data.iteritems():
+ if classification == "progression":
+ txt_file.write(test_name + '\n')
else:
result = "FAIL"
diff --git a/resources/tools/presentation/generator_alerts.py b/resources/tools/presentation/generator_alerts.py
index 2c2b70dc06..a3689f3c87 100644
--- a/resources/tools/presentation/generator_alerts.py
+++ b/resources/tools/presentation/generator_alerts.py
@@ -334,6 +334,15 @@ class Alerting(object):
link=alert["urls"][idx],
build=build,
version=version))
+ regression_hdr = ("\n\n{topo}-{arch}, "
+ "CSIT build: {link}/{build}, "
+ "VPP version: {version}\n\n"
+ .format(topo=test_set.split('-')[-2],
+ arch=test_set.split('-')[-1],
+ link=alert["urls"][idx],
+ build=build,
+ version=version
+ ))
max_len_name = 0
max_len_nics = 0
max_len_framesizes = 0
@@ -364,16 +373,37 @@ class Alerting(object):
# Add list of regressions:
file_name = "{0}/cpta-regressions-{1}.txt".\
- format(config["output-dir"],
- alert["urls"][idx].split('/')[-1])
+ format(config["output-dir"], alert["urls"][idx].split('/')[-1])
try:
with open(file_name, 'r') as txt_file:
file_content = txt_file.read()
- if file_content:
- text += "\nRegressions (full paths):\n\n"
- text += file_content
- except IOError:
- pass
+ reg_file_name = "{dir}/trending-regressions.txt". \
+ format(dir=config["output-dir"])
+ with open(reg_file_name, 'a+') as reg_file:
+ reg_file.write(regression_hdr)
+ if file_content:
+ reg_file.write(file_content)
+ else:
+ reg_file.write("No regressions")
+ except IOError as err:
+ logging.warning(repr(err))
+
+ # Add list of progressions:
+ file_name = "{0}/cpta-progressions-{1}.txt".\
+ format(config["output-dir"], alert["urls"][idx].split('/')[-1])
+ try:
+ with open(file_name, 'r') as txt_file:
+ file_content = txt_file.read()
+ pro_file_name = "{dir}/trending-progressions.txt". \
+ format(dir=config["output-dir"])
+ with open(pro_file_name, 'a+') as pro_file:
+ pro_file.write(regression_hdr)
+ if file_content:
+ pro_file.write(file_content)
+ else:
+ pro_file.write("No progressions")
+ except IOError as err:
+ logging.warning(repr(err))
text += "\nFor detailed information visit: {url}\n".\
format(url=alert["url-details"])
diff --git a/resources/tools/presentation/specification_CPTA.yaml b/resources/tools/presentation/specification_CPTA.yaml
index 7e46018dd6..a08dda70cf 100644
--- a/resources/tools/presentation/specification_CPTA.yaml
+++ b/resources/tools/presentation/specification_CPTA.yaml
@@ -188,7 +188,7 @@
# 3n-hsw
plot-performance-trending-all-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 770
+ start: 780
end: "lastCompletedBuild"
skip:
- 781
@@ -236,7 +236,7 @@
plot-performance-trending-vpp-3n-hsw:
csit-vpp-perf-mrr-daily-master:
- start: 770
+ start: 780
end: "lastCompletedBuild"
skip:
- 781
@@ -287,7 +287,7 @@
# 3n-skx
plot-performance-trending-all-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 531
@@ -340,7 +340,7 @@
plot-performance-trending-vpp-3n-skx:
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 531
@@ -396,7 +396,7 @@
# 2n-skx
plot-performance-trending-all-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 532
@@ -435,7 +435,7 @@
plot-performance-trending-vpp-2n-skx:
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 532
@@ -696,7 +696,7 @@
# 3n-hsw
csit-vpp-perf-mrr-daily-master:
- start: 770
+ start: 780
end: "lastCompletedBuild"
skip:
- 781
@@ -744,7 +744,7 @@
# 3n-skx
csit-vpp-perf-mrr-daily-master-3n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 531
@@ -797,7 +797,7 @@
# 2n-skx
csit-vpp-perf-mrr-daily-master-2n-skx:
- start: 520
+ start: 530
end: "lastCompletedBuild"
skip:
- 532