dnanexus/dx-toolkit — pull request #44 by abiyani (2013-09-10 04:18:32+00:00)
Title: Adding support for throttling upload speed in UA

A little bird told me that this is a desired feature in UA, hence the pull request.

Details:
* Added a command line option "--throttle", which allows one to specify max upload speed in bytes/second (the total upload speed, not just per thread).
* Internally it sets appropriate CURLOPT_MAX_SEND_SPEED_LARGE value for each curl request. The slightly tricky part is to calculate this value for each thread (since user only provides global speed). I "extern"ed a few variables to compute that.

* Of course default behavior is still unbounded upload speed.

PS: Some external tool like trickle (http://monkey.org/~marius/pages/?page=trickle), or equivalent might also be worth looking into for controlling bandwidth of clients in general.