Commit 7b6deaa3 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Link manipulation work again.

parent 19aa93bc
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ if __name__ == "__main__":

    # TODO: support multiple tests via proper socket termination
    setups = [
        perf.TestSetup(packets=2**10,delay=0,loss=0,reorder=0,duplicate=0)
        perf.TestSetup(packets=2**10,delay=0,loss=30,reorder=0,duplicate=0)
    ]

    for setup in setups:
+2 −2
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ class TestSetup(object):

    def run(self):
        # TODO: create and apply only to specific traffic
        #subprocess.run("tc disc add dev lo root netem " + self.netem_config(), shell=True)
        subprocess.run("tc qdisc add dev lo root netem " + self.netem_config(), shell=True)

        seqnoDigits = math.ceil(math.log10(self.packets))
        recvThread = ReceiverThread(seqnoDigits, self.packets)
@@ -120,7 +120,7 @@ class TestSetup(object):
            item = (recvThread.receivedPackets[i] - sendThread.sentPackets[i]).item()
            delays[i] = item.total_seconds() if item is not None else np.NAN

        #subprocess.run("tc qdisc del dev lo root", shell=True, check=True)
        subprocess.run("tc qdisc del dev lo root", shell=True, check=True)

        results = TestResults()
        results.packetsSent = self.packets