def run_iperf(server):
    p = Popen(['iperf', '-c', server],
              stdout=PIPE,
              stderr=None,
              stdin=None,
              )
    p.wait()
    if p.returncode != 0:
        raise RuntimeError('Could not run iperf')
    stdout = p.stdout.read()
    return parseIPerfOutput(stdout)
dataset/ETHPy150Open facebook/augmented-traffic-control/tests/local-test.py/run_iperf/original