Commit 1e6f5d85 authored by Robert Schmidt's avatar Robert Schmidt

fix(ci): print correct datalog filename automatically

Each "datalog" filename contains a Title. In all files, it is basically
"Processing Time from <file>", which <file> should be the current
filename, but is occasionally wrong.

Remove this title, and print the same automatically with the right
filename.
Signed-off-by: default avatarRobert Schmidt <robert.schmidt@openairinterface.org>
parent 3c307d16
...@@ -675,5 +675,5 @@ class Containerize(): ...@@ -675,5 +675,5 @@ class Containerize():
logging.info(f"check against thresholds from {thresholds}") logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, local_files) success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, local_files)
HTML.CreateHtmlDataLogTable(datalog_rt_stats) HTML.CreateHtmlDataLogTable(datalog_rt_stats, thresholds)
return success return success
...@@ -289,14 +289,14 @@ class HTMLManagement(): ...@@ -289,14 +289,14 @@ class HTMLManagement():
self.htmlFile.close() self.htmlFile.close()
#for the moment it is limited to 4 columns, to be made generic later #for the moment it is limited to 4 columns, to be made generic later
def CreateHtmlDataLogTable(self, DataLog): def CreateHtmlDataLogTable(self, DataLog, filename):
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)): if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
return return
self.htmlFile = open('test_results.html', 'a') self.htmlFile = open('test_results.html', 'a')
# TabHeader # TabHeader
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n') self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
self.htmlFile.write(' <td colspan="6"><b> ---- ' + DataLog['Title'] + ' ---- </b></td>\n') self.htmlFile.write(f' <td colspan="6"><b> ---- Processing Time from {filename} ---- </b></td>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n') self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n') self.htmlFile.write(' <th colspan="3">'+ DataLog['ColNames'][0] +'</th>\n')
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.4x4.fhi72.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.100.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.4x4.fhi72.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.1x1.60.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.60.2x2.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : Processing Time (us) from datalog_rt_stats.default.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : gNB Processing Time (us) from datalog_rt_stats.default.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
# SPDX-License-Identifier: LicenseRef-CSSL-1.0 # SPDX-License-Identifier: LicenseRef-CSSL-1.0
#this is a configuration file
#used to build real time processing statistics
#for 5G NR phy test (gNB terminate)
Title : UE Processing Time (us) from datalog_rt_stats.ue.40.vrtsim.yaml
ColNames : ColNames :
- Metric - Metric
- Average; Max; Count - Average; Max; Count
......
...@@ -146,5 +146,5 @@ class RANManagement(): ...@@ -146,5 +146,5 @@ class RANManagement():
logging.info(f"check against thresholds from {thresholds}") logging.info(f"check against thresholds from {thresholds}")
success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, [l1_file, mac_file]) success, datalog_rt_stats = cls_analysis.Analysis.analyze_rt_stats(thresholds, [l1_file, mac_file])
HTML.CreateHtmlDataLogTable(datalog_rt_stats) HTML.CreateHtmlDataLogTable(datalog_rt_stats, thresholds)
return success return success
...@@ -28,7 +28,6 @@ class TestAnalysis(unittest.TestCase): ...@@ -28,7 +28,6 @@ class TestAnalysis(unittest.TestCase):
macf = "tests/analysis/gnb_phytest.success.nrMAC.log" macf = "tests/analysis/gnb_phytest.success.nrMAC.log"
status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, [l1f, macf]) status, s = cls_analysis.Analysis.analyze_rt_stats(rtsf, [l1f, macf])
self.assertTrue(status) self.assertTrue(status)
self.assertEqual(s['Title'], "Processing Time (us) from datalog_rt_stats.100.2x2.yaml")
self.assertEqual(s['ColNames'], ["Metric", "Average; Max; Count", "Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)"]) self.assertEqual(s['ColNames'], ["Metric", "Average; Max; Count", "Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold)"])
with open(rtsf, 'r') as f: with open(rtsf, 'r') as f:
rt_stats = yaml.load(f, Loader=yaml.FullLoader) rt_stats = yaml.load(f, Loader=yaml.FullLoader)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment