mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
test_l3_longevity.py : getting the upload and download per port
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -296,6 +296,7 @@ class L3VariableTime(Realm):
|
|||||||
total_ul_rate_ll = 0
|
total_ul_rate_ll = 0
|
||||||
total_ul_pkts_ll = 0
|
total_ul_pkts_ll = 0
|
||||||
count = 0
|
count = 0
|
||||||
|
sta_name = ''
|
||||||
|
|
||||||
#print("endp-stats-for-port, port-eid: {}".format(eid_name))
|
#print("endp-stats-for-port, port-eid: {}".format(eid_name))
|
||||||
eid = self.name_to_eid(eid_name)
|
eid = self.name_to_eid(eid_name)
|
||||||
@@ -320,14 +321,9 @@ class L3VariableTime(Realm):
|
|||||||
jit += int(endp["jitter"])
|
jit += int(endp["jitter"])
|
||||||
name = endp["name"]
|
name = endp["name"]
|
||||||
print("endp name {name}".format(name=name))
|
print("endp name {name}".format(name=name))
|
||||||
if name.endswith("-A"):
|
sta_name = name.replace('-A','')
|
||||||
print("name has -A")
|
#only the -A endpoint will be found so need to look
|
||||||
total_dl_rate += int(endp["rx rate"])
|
|
||||||
total_dl_rate_ll += int(endp["rx rate ll"])
|
|
||||||
total_dl_pkts_ll += int(endp["rx pkts ll"])
|
|
||||||
total_ul_rate += int(endp["tx rate"])
|
|
||||||
total_ul_rate_ll += int(endp["tx rate ll"])
|
|
||||||
total_ul_pkts_ll += int(endp["tx pkts ll"])
|
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
print("Matched: name: {name} eid:{eid} to endp-id {eid_endp}".format(name=name,eid=eid,eid_endp=eid_endp))
|
print("Matched: name: {name} eid:{eid} to endp-id {eid_endp}".format(name=name,eid=eid,eid_endp=eid_endp))
|
||||||
@@ -339,6 +335,22 @@ class L3VariableTime(Realm):
|
|||||||
lat = int(lat / count)
|
lat = int(lat / count)
|
||||||
jit = int(jit / count)
|
jit = int(jit / count)
|
||||||
|
|
||||||
|
# need to loop though again to find the upload and download per station if the name matched
|
||||||
|
for endp in endps:
|
||||||
|
if sta_name in endp["name"]:
|
||||||
|
name = endp["name"]
|
||||||
|
if name.endswith("-A"):
|
||||||
|
print("name has -A")
|
||||||
|
total_dl_rate += int(endp["rx rate"])
|
||||||
|
total_dl_rate_ll += int(endp["rx rate ll"])
|
||||||
|
total_dl_pkts_ll += int(endp["rx pkts ll"])
|
||||||
|
# -B upload side
|
||||||
|
else:
|
||||||
|
total_ul_rate += int(endp["rx rate"])
|
||||||
|
total_ul_rate_ll += int(endp["rx rate ll"])
|
||||||
|
total_ul_pkts_ll += int(endp["rx pkts ll"])
|
||||||
|
|
||||||
|
|
||||||
return lat, jit, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll
|
return lat, jit, total_dl_rate, total_dl_rate_ll, total_dl_pkts_ll, total_ul_rate, total_ul_rate_ll, total_ul_pkts_ll
|
||||||
|
|
||||||
# Query all endpoints to generate rx and other stats, returned
|
# Query all endpoints to generate rx and other stats, returned
|
||||||
|
|||||||
Reference in New Issue
Block a user