Merge remote-tracking branch 'origin/ci_test_nsa_fix_quectel_nic' into integration_2021_wk20_a
This commit is contained in:
+47
-3
@@ -707,6 +707,8 @@ class RANManagement():
|
||||
real_time_stats = {}
|
||||
#count "problem receiving samples" msg
|
||||
pb_receiving_samples_cnt = 0
|
||||
#NSA specific log markers
|
||||
nsa_markers ={'SgNBReleaseRequestAcknowledge': [],'FAILURE': [], 'scgFailureInformationNR-r15': [], 'SgNBReleaseRequest': []}
|
||||
|
||||
#the datalog config file has to be loaded
|
||||
datalog_rt_stats_file='datalog_rt_stats.yaml'
|
||||
@@ -722,8 +724,9 @@ class RANManagement():
|
||||
datalog_rt_stats = yaml.load(f,Loader=yaml.FullLoader)
|
||||
rt_keys = datalog_rt_stats['Ref'] #we use the keys from the Ref field
|
||||
|
||||
|
||||
line_cnt=0 #log file line counter
|
||||
for line in enb_log_file.readlines():
|
||||
line_cnt+=1
|
||||
# Runtime statistics
|
||||
result = re.search('Run time:' ,str(line))
|
||||
if result is not None:
|
||||
@@ -899,7 +902,13 @@ class RANManagement():
|
||||
#count "problem receiving samples" msg
|
||||
result = re.search('\[PHY\]\s+problem receiving samples', str(line))
|
||||
if result is not None:
|
||||
pb_receiving_samples_cnt += 1
|
||||
pb_receiving_samples_cnt += 1
|
||||
|
||||
#nsa markers logging
|
||||
for k in nsa_markers:
|
||||
result = re.search(k, line)
|
||||
if result is not None:
|
||||
nsa_markers[k].append(line_cnt)
|
||||
|
||||
enb_log_file.close()
|
||||
logging.debug(' File analysis completed')
|
||||
@@ -908,7 +917,7 @@ class RANManagement():
|
||||
else:
|
||||
nodeB_prefix = 'g'
|
||||
|
||||
if self.air_interface[self.eNB_instance] == 'nr-softmodem':
|
||||
if nodeB_prefix == 'g':
|
||||
if ulschReceiveOK > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
@@ -935,6 +944,22 @@ class RANManagement():
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
#nsa markers
|
||||
statMsg = 'logfile line count = ' + str(line_cnt)
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
if len(nsa_markers['SgNBReleaseRequestAcknowledge'])!=0:
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequestAcknowledge'][0])
|
||||
else:
|
||||
statMsg = 'SgNBReleaseRequestAcknowledge = ' + str(len(nsa_markers['SgNBReleaseRequestAcknowledge'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
statMsg = 'FAILURE = ' + str(len(nsa_markers['FAILURE'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
|
||||
#ulsch and dlsch statistics
|
||||
if len(dlsch_ulsch_stats)!=0: #check if dictionary is not empty
|
||||
@@ -966,6 +991,25 @@ class RANManagement():
|
||||
logging.debug('No real time stats found in the log file')
|
||||
htmleNBFailureMsg += statMsg
|
||||
|
||||
else:
|
||||
#nsa markers
|
||||
statMsg = 'logfile line count = ' + str(line_cnt)
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
if len(nsa_markers['SgNBReleaseRequest'])!=0:
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences , starting line ' + str(nsa_markers['SgNBReleaseRequest'][0])
|
||||
else:
|
||||
statMsg = 'SgNBReleaseRequest = ' + str(len(nsa_markers['SgNBReleaseRequest'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
statMsg = 'scgFailureInformationNR-r15 = ' + str(len(nsa_markers['scgFailureInformationNR-r15'])) + ' occurences'
|
||||
htmlMsg = statMsg+'\n'
|
||||
logging.debug(statMsg)
|
||||
htmleNBFailureMsg += htmlMsg
|
||||
|
||||
|
||||
if uciStatMsgCount > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
|
||||
Reference in New Issue
Block a user