Esempio n. 1
0
def do_localhost_btc(args):
    out = {}
    out["type"] = "Localhost BTC"
    out["time"] = time.time()
    out["senders"] = args.host
    out["receiver"] = "127.0.0.1"
    out["concurrent"] = args.concurrent
    if "name" in args:
        out["name"] = args.name
    print("Gathering state for host %s" % args.host)
    out["state_sender"] = os_status.get_status(args.host, False)
    print("Measuring localhost BTC on %s" % (args.host,))
    out["btc"] = nuttcp.measure_btc_localhost(args.host, args.concurrent, args.duration)
    emit_output(out, args)
Esempio n. 2
0
 def measure_lobtc_test(self):
     ret = nuttcp.measure_btc_localhost("127.0.0.1", 2, 5)
     self.assertEqual(len(ret), 2)