-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
line, error_msg = line[:-1].split(u'###', maxsplit=1)
test = line.split(u'-')
name = u'-'.join(test[3:-1])
+ if len(error_msg) > 128:
+ if u";" in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u';', 1)[0]}..."
+ elif u":" in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u':', 1)[0]}..."
+ elif u"." in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u'.', 1)[0]}..."
+ elif u"?" in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u'?', 1)[0]}..."
+ elif u"!" in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u'!', 1)[0]}..."
+ elif u"," in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u',', 1)[0]}..."
+ elif u" " in error_msg[128:256]:
+ error_msg = \
+ f"{error_msg[:128]}" \
+ f"{error_msg[128:].split(u' ', 1)[0]}..."
+ else:
+ error_msg = error_msg[:128]
+
except ValueError:
continue
:param idx: Index of the test set as it is specified in the
specification file.
:param header: The header of the list of [re|pro]gressions.
- :param re_pro: 'regression' or 'progression'.
+ :param re_pro: 'regressions' or 'progressions'.
:type alert: dict
:type idx: int
:type header: str
text = u""
- legend = (f"Legend:\n[ Last trend in Mpps | number of runs for "
- f"last trend |")
+ legend = (f"Legend: Test-name NIC Frame-size Trend[Mpps] Runs[#] "
+ f"Long-Term change[%]")
out_file = (
f"{self.configs[alert[u'way']][u'output-dir']}/"
)
try:
with open(out_file, u'w') as reg_file:
- reg_file.write(f"{legend} regressions ]")
+ reg_file.write(legend)
except IOError:
logging.error(f"Not possible to write the file {out_file}.txt.")
)
try:
with open(out_file, u'w') as reg_file:
- reg_file.write(f"{legend} progressions ]")
+ reg_file.write(legend)
except IOError:
logging.error(f"Not possible to write the file {out_file}.txt.")
try:
groups = re.search(
re.compile(
- r'((vpp|dpdk)-\dn-(skx|clx|tsh|dnv|zn2|tx2)-.*)'
+ r'((vpp|dpdk)-\dn-(skx|clx|tsh|dnv|zn2|tx2|icx|alt)-.*)'
),
test_set
)