Commit c4a3f569 authored by hardy's avatar hardy Committed by Robert Schmidt

fix stats logs concatenation

parent 50e7f379
......@@ -60,18 +60,17 @@ class StatMonitor():
self.d[node_type]['mcs'].append(int(result.group(4)))
def collect(self,node_type):
def collect(self,testcase_id,node_type):
if node_type=='enb':
files = ["L1_stats.log", "MAC_stats.log", "PDCP_stats.log", "RRC_stats.log"]
else: #'gnb'
files = ["nrL1_stats.log", "nrMAC_stats.log", "nrPDCP_stats.log", "nrRRC_stats.log"]
# append each file's contents to another file (prepended with CI-) for
# post-mortem/debugging analysis
#for f in files:
# cmd = 'cat '+ f + ' >> CI-' + f
# if os.path.isfile(f):
# subprocess.Popen(cmd,shell=True)
# join the files for further processing
#append each file's contents to another file (prepended with CI-) for debug
for f in files:
if os.path.isfile(f):
cmd = 'cat '+ f + ' >> CI-'+testcase_id+'-'+f
subprocess.Popen(cmd,shell=True)
#join the files for further processing
cmd='cat '
for f in files:
if os.path.isfile(f):
......@@ -130,7 +129,7 @@ if __name__ == "__main__":
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
output = process.stdout.readlines()
while len(output)!=0 :
mon.collect(node)
mon.collect(testcase_id,node)
process=subprocess.Popen(CMD, shell=True, stdout=subprocess.PIPE)
output = process.stdout.readlines()
time.sleep(1)
......
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