]> arthur.barton.de Git - bup.git/blobdiff - cmd/split-cmd.py
cmd/{save,split}: add a --bwlimit option.
[bup.git] / cmd / split-cmd.py
index ff73c3f25fec0ddac8b6f66a1839cedf7fc6c3d5..b065892f12af0e1c3c6b6c66464bfb8f6957c30a 100755 (executable)
@@ -20,7 +20,8 @@ copy       just copy input to output, hashsplitting along the way
 bench      print benchmark timings to stderr
 max-pack-size=  maximum bytes in a single pack
 max-pack-objects=  maximum number of objects in a single pack
-fanout=  maximum number of blobs in a single tree
+fanout=    maximum number of blobs in a single tree
+bwlimit=   maximum bytes/sec to transmit to server
 """
 o = options.Options('bup split', optspec)
 (opt, flags, extra) = o.parse(sys.argv[1:])
@@ -44,6 +45,8 @@ if opt.fanout:
     hashsplit.fanout = parse_num(opt.fanout)
 if opt.blobs:
     hashsplit.fanout = 0
+if opt.bwlimit:
+    client.bwlimit = parse_num(opt.bwlimit)
 
 is_reverse = os.environ.get('BUP_SERVER_REVERSE')
 if is_reverse and opt.remote: