コード例 #1
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/flicflac")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('flicflac')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #2
0
for wifi_block in wifi_blocks:
    for app_type in ["NDN_DemoApps"]:
        for run in range(0, NUM_RUNS):

            # determine client-server groups
            random.seed(run*1000)
            serverNode = random.randint(0,11)
            client_gateways = []
            for c in range(0, NUM_CLIENTS):
                client_gateways.append(random.randint(0,11))
            client_startTimes = random.sample(range(0, int(EMULATION_DURATION / 2)), NUM_CLIENTS)
            print("client_start-times: " + str(client_startTimes))

            # general emulation settings
            emu = Emulation("./example.config.py", list(range(0,12 + NUM_CLIENTS)))
            emu.setName(os.path.basename(wifi_block) + "_" + app_type + "_" + str(run))
            emu.setLinkCmdBackend(BDL_())
            emu.setSecondsBetweenRuns(5)
            emu.setOutputDirectory('./results/onlyNdnDemoApps_experiment/' + emu.getName())
            emu.setDuration(EMULATION_DURATION) # seconds


            # ensure NFD-logfiles are cleaned up and wldrdaemons are shutdown
            for node in emu.getNodes():
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo rm /var/run/shm/nfd_packet_log/nfd_packet_log.csv")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall wldrdaemon_udp")
                node.scheduleUserCmd(constants.SETUP_TIME, "sudo killall tail")

            # set up network-blocks
            abileneNetwork = NetworkBlock("./blocks/abilene")
            abileneNetwork.setNodes(emu.getNodes()[0:12])
コード例 #3
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/baseline_60Mbps")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 60000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('baseline_60Mbps')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.l_ import L_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(L_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/flicflac")
nb1.setNodes([n0, n1])

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(20)

for interval in [1000, 500, 250, 100]:
    nb1.selectInterval(interval)
    emu.setName('flicflac_loss_interval_' + str(interval))
    emu.setOutputDirectory('./results/' + emu.getName())
    emu.start()
from emulation_lib.linkcmd_backends.bdl_ import BDL_
from emulation_lib.linkcmd_backends.d_bl import D_BL

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(D_BL())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/two_node_7000")
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn("", 3, 27000.0)) # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 7500, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for interval in [1000]:
    nb1.selectInterval(interval)
    emu.setName('two_node_bwexp_interval_' + str(interval))
    emu.setOutputDirectory('./results/' + emu.getName())
    emu.start()
from emulation_lib.linkcmd_backends.d_bl import D_BL

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(D_BL())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/TwoNode_80211a_adhoc")
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn(
    "", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 7500, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for interval in [1000, 500, 250, 100]:
    nb1.selectInterval(interval)
    emu.setName('TwoNode_80211a_adhoc_bwexp_interval_' + str(interval))
    emu.setOutputDirectory('./results/' + emu.getName())
    emu.start()
コード例 #7
0
cmd_dists = [BD_(), BDL_(), netem_BDL_(), D_BL(), DL_B()]
emu = Emulation("../example.config.py", [0, 1])
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/original_sim_normal")
nb1.selectInterval(1000)
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn(
    "", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 7500, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for dist in cmd_dists:
    emu.setLinkCmdBackend(dist)
    emu.setName(str(dist))
    emu.setOutputDirectory('./results/original_sim_normal_bwexp_dists/' +
                           emu.getName())
    emu.start()
コード例 #8
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(10)

for interval in [1000, 500, 250, 100]:
    nb1.selectInterval(interval)
    emu.setName('symmetric_interval_' + str(interval))
    emu.setOutputDirectory('./results/' + emu.getName())
    emu.start()
コード例 #9
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('symmetric')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #10
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/flicflac_60Mbps")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 60000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('flicflac_60Mbps')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #11
0
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.l_ import L_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(L_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

# http://dashif.org/wp-content/uploads/2015/04/DASH-AVC-264-Test-Vectors-v09-CommunityReview.pdf
nb1 = NetworkBlock("./blocks/NP2j")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('NP2j_loss')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #12
0
emu_duration = 14  # seconds

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)
nb1.addPreprocessingStep(SetConstantValueForColumn("1_0", 3, 10000.0))

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, emu_duration - 2, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(emu_duration)

emu.addApplications([udperf_app])

emu.setName('symmetric_constantValue')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(1)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #13
0
from emulation_lib.emulation import Emulation
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.preprocessing.set_constant_value_for_column import SetConstantValueForColumn
from emulation_lib.preprocessing.repeat_file_until import RepeatIntermedFileUntil
from emulation_lib.linkcmd_backends.bdl_ import BDL_
import iperf_logapp

NUM_RUNS = 2
EMULATION_DURATION = 100  # seconds
NUMBER_OF_NODES = 2

#
# general emulation settings
#
emu = Emulation("./example.config.py", list(range(0, NUMBER_OF_NODES)))
emu.setName("HelloWorld")
emu.setLinkCmdBackend(BDL_())
emu.setSecondsBetweenRuns(5)
emu.setOutputDirectory('./results/HelloWorld')
# time in seconds, after which a run is to be considered finished, which triggers the fetching
# of the results and the initiation of the next run
emu.setDuration(EMULATION_DURATION)  # seconds

#
# configure network block
#
# the folder containing the pre-calculated intermediate files to be used
WIFI_BLOCK = "./blocks/simple_mobility_802.11G_AdHoc_constant"
# create a new network block object based on the given intermediate file folder
wlan = NetworkBlock(WIFI_BLOCK)
wlan.setNodes(
コード例 #14
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/symmetric_60Mbps")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 60000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('symmetric_60Mbps')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #15
0
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.bdl_ import BDL_

emu = Emulation("./config_files/example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/profile1")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app1 = UdperfApp(n0, n1, 0.0, 19, 3000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n0, 0.0, 19, 3000, 6000, 6001)

n0.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched0.log_%RUN%")
n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched1.log_%RUN%")

emu.setDuration(20)

emu.addApplications([udperf_app1, udperf_app2])

emu.setName('reactionTime')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(3)
emu.setSecondsBetweenRuns(15)

emu.start()
コード例 #16
0
from emulation_lib.emulation import Emulation
from emulation_lib.network_blocks.static_network_block import StaticNetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.bdl_ import BDL_

emu = Emulation("./config_files/example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

s1 = StaticConnection(0, 1, 6442.800, 0.001000, 50.00)
s2 = StaticConnection(1, 0, 10983.440, 0.00100, 50.00)
snb = StaticNetworkBlock('./blocks/static', [s1, s2], 1000)
snb.setNodes([n0, n1])

emu.addNetworkBlocks([snb])

udperf_app1 = UdperfApp(n0, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n0, 0.0, 99, 9000, 6000, 6001)

emu.setDuration(102)

emu.addApplications([udperf_app1, udperf_app2])

emu.setName('simpleStatic')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(1)
emu.setSecondsBetweenRuns(15)

emu.start()
コード例 #17
0
    "./blocks/sim2/two_nodes_802.11G",
    "./blocks/sim2/wifi_linearDistanceUDP_deferredStart_udperf",
    "./blocks/sim2/two_nodes_802.11G_unidir"
]
nb1 = NetworkBlock(blockPaths[0])  # init nb1
emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for bpath in blockPaths:
    # update nb1
    emu.removeNetworkBlocks([nb1])
    nb1 = NetworkBlock(bpath)
    nb1.setNodes([n0, n1])
    nb1.selectInterval(1000)
    nb1.addPreprocessingStep(SetConstantValueForColumn("", 3, 27000.0))
    emu.addNetworkBlocks([nb1])

    emu.setName('multisim_' + os.path.basename(bpath))
    emu.setOutputDirectory('./results/sim2/' + emu.getName())
    emu.start()
コード例 #18
0
n1 = emu.getNode(1)
n2 = emu.getNode(2)

nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

nb2 = NetworkBlock("./blocks/symmetric")
nb2.setNodes([n2, n1])
nb2.selectInterval(1000)

emu.addNetworkBlocks([nb1, nb2])

udperf_app0 = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n2, 0.0, 12, 6000, 6000,
                        6002)  # own-Ports must be unique on the same node!

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app0, udperf_app2])

emu.setName('symmetric_twoFlows')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #19
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/symmetric_half")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 3000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('symmetric_half')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #20
0
emu_duration = 60  # seconds

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)
nb1.addPreprocessingStep(RepeatIntermedFileUntil(emu_duration, False))

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, emu_duration - 2, 6000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(emu_duration)

emu.addApplications([udperf_app])

emu.setName('symmetric_repeated')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(1)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #21
0
from emulation_lib.emulation import Emulation
from emulation_lib.network_blocks.random_static_network_block import RandomStaticNetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.bdl_ import BDL_

emu = Emulation("./config_files/example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


rsb = RandomStaticNetworkBlock('./blocks/rstatic', 2, 0.15, 1337, [4000, 5000], [1, 5], [0, 0], 1000)
rsb.setNodes([n0, n1])

emu.addNetworkBlocks([rsb])

udperf_app1 = UdperfApp(n0, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n0, 0.0, 99, 9000, 6000, 6001)

emu.setDuration(102)

emu.addApplications([udperf_app1, udperf_app2])

emu.setName('simpleRandomStatic')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(3)
emu.setSecondsBetweenRuns(15)

emu.start()
コード例 #22
0
nb1.selectInterval(1000)

nb2 = NetworkBlock("./blocks/TwoNode_80211a_adhoc")
nb2.setNodes([n2, n3])
nb2.selectedInterval(1000)

emu.addNetworkBlocks([snb, nb1, nb2])

udperf_app0_1 = UdperfApp(n0, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app1_0 = UdperfApp(n1, n0, 0.0, 99, 9000, 6000, 6001)
udperf_app0_2 = UdperfApp(n0, n2, 0.0, 99, 9000, 6000, 6001)
udperf_app2_0 = UdperfApp(n2, n0, 0.0, 99, 9000, 6000, 6001)
udperf_app1_3 = UdperfApp(n1, n3, 0.0, 99, 9000, 6000, 6001)
udperf_app3_1 = UdperfApp(n3, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app2_3 = UdperfApp(n2, n3, 0.0, 99, 9000, 6000, 6001)
udperf_app3_2 = UdperfApp(n3, n2, 0.0, 99, 9000, 6000, 6001)

emu.setDuration(102)

emu.addApplications([
    udperf_app0_1, udperf_app1_0, udperf_app0_2, udperf_app2_0, udperf_app1_3,
    udperf_app3_1, udperf_app2_3, udperf_app3_2
])

emu.setName('simpleFourNodeStatic')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(3)
emu.setSecondsBetweenRuns(15)

emu.start()
コード例 #23
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.d_ import D_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(D_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/flicflac")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('flicflac_delay')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #24
0
nb1 = NetworkBlock("./blocks/symmetric")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

nb2 = NetworkBlock("./blocks/symmetric")
nb2.setNodes([n2, n1])
nb2.selectInterval(1000)

nb3 = NetworkBlock("./blocks/symmetric")
nb3.setNodes([n3, n1])
nb3.selectInterval(1000)

emu.addNetworkBlocks([nb1, nb2, nb3])

udperf_app0 = UdperfApp(n1, n0, 0.0, 12, 6000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n2, 0.0, 12, 6000, 6000, 6002)  # own-Ports must be unique on the same node!
udperf_app3 = UdperfApp(n1, n3, 0.0, 12, 6000, 6000, 6003)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app0, udperf_app2, udperf_app3])

emu.setName('symmetric_threeFlows')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(0)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #25
0
emu = Emulation("./config_files/example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/TwoNode_80211a_adhoc")
nb1.setNodes([n0, n1])

emu.addNetworkBlocks([nb1])

udperf_app1 = UdperfApp(n0, n1, 0.0, 99, 9000, 6000, 6001)
udperf_app2 = UdperfApp(n1, n0, 0.0, 99, 9000, 6000, 6001)

n0.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched0.log_%RUN%")
n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched1.log_%RUN%")

emu.setDuration(102)

emu.addApplications([udperf_app1, udperf_app2])

emu.setName('simple_sequence')
emu.setNumberOfRuns(3)
emu.setSecondsBetweenRuns(15)

for intervalSize in [1000, 500, 250, 100]:
    emu.setName(intervalSize)
    emu.setOutputDirectory('./results/simple_sequence/' + emu.getName())
    nb1.selectInterval(intervalSize)
    emu.start()
コード例 #26
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.d_bl import D_BL

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(D_BL())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/original_sim_normal")
nb1.setNodes([n0, n1])

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 7500, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(1)

for interval in [1000, 500, 250, 100]:
    nb1.selectInterval(interval)
    emu.setName('original_sim_normal_interval_' + str(interval))
    emu.setOutputDirectory('./results/' + emu.getName())
    emu.start()
from emulation_lib.preprocessing.set_constant_value_for_column import SetConstantValueForColumn
from emulation_lib.linkcmd_backends.bdl_ import BDL_

emu = Emulation("example.config.py", [0, 1])
emu.setLinkCmdBackend(BDL_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)


nb1 = NetworkBlock("./blocks/simple_mobility_802.11G_AdHoc_constant")
nb1.setNodes([n0, n1])
nb1.addPreprocessingStep(SetConstantValueForColumn("", 3, 27000.0))  # empty prefix -> apply to all files

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 110, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log", "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(112)

emu.addApplications([udperf_app])
emu.setSecondsBetweenRuns(5)
emu.setNumberOfRuns(40)

for interval in [1000, 500, 250, 100, 50, 25]:
    nb1.selectInterval(interval)
    emu.setName(str(interval))
    emu.setOutputDirectory('./results/simple_mobility_802.11G_AdHoc_constant/' + emu.getName())
    emu.start()
コード例 #28
0
from emulation_lib.network_blocks.network_block import NetworkBlock
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.b_ import B_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(B_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

nb1 = NetworkBlock("./blocks/symmetric_double")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 11000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('symmetric_double')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #29
0
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.l_ import L_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(L_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

# http://dashif.org/wp-content/uploads/2015/04/DASH-AVC-264-Test-Vectors-v09-CommunityReview.pdf
nb1 = NetworkBlock("./blocks/flicflac")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('flicflac_loss')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(10)
emu.setSecondsBetweenRuns(5)

emu.start()
コード例 #30
0
from emulation_lib.apps.udperf_app import UdperfApp
from emulation_lib.linkcmd_backends.d_ import D_

emu = Emulation("../example.config.py", [0, 1])
emu.setLinkCmdBackend(D_())
n0 = emu.getNode(0)
n1 = emu.getNode(1)

# http://dashif.org/wp-content/uploads/2015/04/DASH-AVC-264-Test-Vectors-v09-CommunityReview.pdf
nb1 = NetworkBlock("./blocks/NP2j")
nb1.setNodes([n0, n1])
nb1.selectInterval(1000)

emu.addNetworkBlocks([nb1])

udperf_app = UdperfApp(n1, n0, 0.0, 12, 10000, 6000, 6001)

n1.addUserResult("/home/nfd/cmdScheduler.log",
                 "cmdSched" + str(n1.getId()) + ".log_%RUN%")

emu.setDuration(14)

emu.addApplications([udperf_app])

emu.setName('delay_NP2j')
emu.setOutputDirectory('./results/' + emu.getName())
emu.setNumberOfRuns(1)
emu.setSecondsBetweenRuns(5)

emu.start()