mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
lf_kpi_csv.py : path output fix
test_l3_longevity.py : output kpi path ct_us_001_test.json : kpi to database Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -79,7 +79,8 @@ class lf_kpi_csv:
|
|||||||
#try:
|
#try:
|
||||||
print("self.kpi_path {kpi_path}".format(kpi_path=self.kpi_path))
|
print("self.kpi_path {kpi_path}".format(kpi_path=self.kpi_path))
|
||||||
print("self.kpi_filename {kpi_filename}".format(kpi_filename=self.kpi_filename))
|
print("self.kpi_filename {kpi_filename}".format(kpi_filename=self.kpi_filename))
|
||||||
kpifile = self.kpi_path + self.kpi_filename
|
kpifile = self.kpi_path + '/' + self.kpi_filename
|
||||||
|
print("kpifile {kpifile}".format(kpifile=kpifile))
|
||||||
self.kpi_file = open(kpifile,'w')
|
self.kpi_file = open(kpifile,'w')
|
||||||
self.kpi_writer = csv.DictWriter(self.kpi_file, fieldnames=self.kpi_headers)
|
self.kpi_writer = csv.DictWriter(self.kpi_file, fieldnames=self.kpi_headers)
|
||||||
self.kpi_writer.writeheader()
|
self.kpi_writer.writeheader()
|
||||||
@@ -119,6 +120,7 @@ class lf_kpi_csv:
|
|||||||
|
|
||||||
def kpi_csv_write_dict(self,kpi_dict):
|
def kpi_csv_write_dict(self,kpi_dict):
|
||||||
self.kpi_writer.writerow(kpi_dict)
|
self.kpi_writer.writerow(kpi_dict)
|
||||||
|
self.kpi_file.flush()
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Date: date of run
|
Date: date of run
|
||||||
@@ -137,7 +139,6 @@ class lf_kpi_csv:
|
|||||||
Graph-Group - Items graphed together used by dashboard, For the lf_qa.py dashboard
|
Graph-Group - Items graphed together used by dashboard, For the lf_qa.py dashboard
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def kpi_csv_writerow(self,row):
|
def kpi_csv_writerow(self,row):
|
||||||
self.kpi_writer.writerow(row)
|
self.kpi_writer.writerow(row)
|
||||||
self.kpi_file.flush()
|
self.kpi_file.flush()
|
||||||
|
|||||||
@@ -2030,6 +2030,8 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
|
|||||||
|
|
||||||
# Get the report path to create the kpi.csv path
|
# Get the report path to create the kpi.csv path
|
||||||
kpi_path = report.get_report_path()
|
kpi_path = report.get_report_path()
|
||||||
|
print("kpi_path :{kpi_path}".format(kpi_path=kpi_path))
|
||||||
|
|
||||||
kpi_csv = lf_kpi_csv.lf_kpi_csv(
|
kpi_csv = lf_kpi_csv.lf_kpi_csv(
|
||||||
_kpi_path = kpi_path,
|
_kpi_path = kpi_path,
|
||||||
_kpi_test_rig = test_rig,
|
_kpi_test_rig = test_rig,
|
||||||
@@ -2039,7 +2041,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m
|
|||||||
_kpi_dut_model_num = dut_model_num,
|
_kpi_dut_model_num = dut_model_num,
|
||||||
_kpi_test_id = test_id)
|
_kpi_test_id = test_id)
|
||||||
|
|
||||||
|
|
||||||
if args.csv_outfile is not None:
|
if args.csv_outfile is not None:
|
||||||
current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
|
current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
|
||||||
csv_outfile = "{}_{}-test_l3_longevity.csv".format(args.csv_outfile, current_time)
|
csv_outfile = "{}_{}-test_l3_longevity.csv".format(args.csv_outfile, current_time)
|
||||||
|
|||||||
@@ -23,9 +23,20 @@
|
|||||||
"command":"test_l3_longevity.py",
|
"command":"test_l3_longevity.py",
|
||||||
"args":"",
|
"args":"",
|
||||||
"args_list":[
|
"args_list":[
|
||||||
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 90s --polling_interval 10s --upstream_port eth2 ",
|
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 15s --polling_interval 5s --upstream_port eth2 ",
|
||||||
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
|
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
|
||||||
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000"
|
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000",
|
||||||
|
" --test_rig TEST_RIG --test_tag 'l3_longevity'"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lf_qa":{
|
||||||
|
"enabled":"TRUE",
|
||||||
|
"timeout":"600",
|
||||||
|
"load_db":"skip",
|
||||||
|
"command":"./tools/lf_qa.py",
|
||||||
|
"args":"",
|
||||||
|
"args_list":[
|
||||||
|
" --path REPORT_PATH --store --png --database DATABASE_SQLITE"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -39,9 +50,21 @@
|
|||||||
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 15s --polling_interval 5s --upstream_port eth2 ",
|
" --lfmgr LF_MGR_IP --local_lf_report_dir REPORT_PATH --test_duration 15s --polling_interval 5s --upstream_port eth2 ",
|
||||||
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
|
" use_ssid_idx=1 --radio 'radio==wiphy1,stations==4,ssid==SSID_USED,ssid_pw==SSID_PW_USED,security==SECURITY_USED' ",
|
||||||
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000",
|
" --endp_type lf_udp --rates_are_totals --side_a_min_bps=20000 --side_b_min_bps=300000000",
|
||||||
|
" --test_rig TEST_RIG --test_tag 'l3_longevity'",
|
||||||
" --ap_read --ap_test_mode"
|
" --ap_read --ap_test_mode"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"lf_qa":{
|
||||||
|
"enabled":"TRUE",
|
||||||
|
"timeout":"600",
|
||||||
|
"load_db":"skip",
|
||||||
|
"command":"./tools/lf_qa.py",
|
||||||
|
"args":"",
|
||||||
|
"args_list":[
|
||||||
|
" --path REPORT_PATH --store --png --database DATABASE_SQLITE"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"suite_l3_reset":{
|
"suite_l3_reset":{
|
||||||
"test_l3_longevity":{
|
"test_l3_longevity":{
|
||||||
|
|||||||
Reference in New Issue
Block a user