Mods to summed output after meeting.
Этот коммит содержится в:
родитель
8d94dc289d
Коммит
897687ac0f
@ -36,6 +36,8 @@ def generate_output(iperf, options):
|
||||
def summed_output(iperf, options):
|
||||
"""Format summed output."""
|
||||
|
||||
for i in iperf.get('intervals'):
|
||||
|
||||
row_header = None
|
||||
|
||||
byte = list()
|
||||
@ -43,13 +45,12 @@ def summed_output(iperf, options):
|
||||
retransmits = list()
|
||||
snd_cwnd = list()
|
||||
|
||||
for i in iperf.get('intervals'):
|
||||
for ii in i.get('streams'):
|
||||
if options.verbose:
|
||||
pp.pprint(i)
|
||||
# grab the first start value
|
||||
if row_header is None:
|
||||
row_header = round(float(ii.get('start')), 4)
|
||||
row_header = round(float(ii.get('start')), 2)
|
||||
# aggregate the rest of the values
|
||||
byte.append(ii.get('bytes'))
|
||||
bits_per_second.append(float(ii.get('bits_per_second')) / (1000*1000*1000))
|
||||
@ -64,7 +65,7 @@ def summed_output(iperf, options):
|
||||
s=round(sum(snd_cwnd) / len(snd_cwnd), 2)
|
||||
)
|
||||
|
||||
return row
|
||||
yield row
|
||||
|
||||
|
||||
def main():
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user