Commit 51c6a0b8 authored by Andreas Schmidt's avatar Andreas Schmidt

Eval script outputs loss pattern.

parent 6e194ebf
...@@ -51,7 +51,7 @@ class SenderThread(threading.Thread): ...@@ -51,7 +51,7 @@ class SenderThread(threading.Thread):
d = str(i).zfill(self.seqnoDigits) d = str(i).zfill(self.seqnoDigits)
self.sentPackets[i] = datetime.datetime.now() self.sentPackets[i] = datetime.datetime.now()
self.sock.send(d) self.sock.send(d)
time.sleep(0.000001) time.sleep(0.00001)
self.sock.close() self.sock.close()
...@@ -73,7 +73,14 @@ class TestResults(object): ...@@ -73,7 +73,14 @@ class TestResults(object):
delayMin = np.min(delayValues) * 1000 delayMin = np.min(delayValues) * 1000
delayMax = np.max(delayValues) * 1000 delayMax = np.max(delayValues) * 1000
delays = "Application Latency [ms]: %f+-%f [%f - %f]" % (delayMean, delayStd, delayMin, delayMax) delays = "Application Latency [ms]: %f+-%f [%f - %f]" % (delayMean, delayStd, delayMin, delayMax)
return "%s\n%s\n%s" % (loss, duplicates, delays)
losses = "Loss Pattern:\n" + "| " * 9 + "|"
for i,x in np.ndenumerate(self.delays):
if i[0] % 100 == 0:
losses += "\n"
losses += "!" if np.isnan(x) else "."
return "%s\n%s\n%s\n%s" % (loss, duplicates, delays, losses)
class TestSetup(object): class TestSetup(object):
def __init__(self,packets=20,delay=1,delay_variation=0,delay_correlation=0,loss=0,loss_correlation=0,duplicate=0,reorder=0,reorder_correlation=0): def __init__(self,packets=20,delay=1,delay_variation=0,delay_correlation=0,loss=0,loss_correlation=0,duplicate=0,reorder=0,reorder_correlation=0):
......
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