KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
throttle
★ 12
Open GitHub ↗
A bandwidth throttling script
Download README (.md)
Explore Similar Repositories
baltimorevacants
:
Web Site for Baltimore Vacant Housing Listings
themes.jekyllbootstrap.com
:
No description available.
spinto
:
The Spinto Ruby Gem - Build Jekyll sites like www.spintoapp.com does.
graph-maven-plugin
:
Maven plugin for graphing dependencies using Graphviz
hd-android-app
:
Hacker Dojo Android App
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
throttle
?
Download (.md)
throttle.py -- A Bandwidth throttler in python ============================================== throttle.py takes (by default) stdin and writes it to stdout limited to whatever rate you specify. This is useful for limiting disk bandwidth, or in conjunction with nc, network bandwidth. The actual algorithm for performing the rate limiting runs every 10ms. 100 times a second it writes 1/100th of the per-second data rate that you specify. If for some reason the input fails to keep up with the output, throttle.py will continue writing as fast as it can, until the average it back to the rate specified. Inspired by James Klicman's c throttle at http://klicman.org/throttle/ Instructions: ------------- ``` Usage: throttle.py [options] Options: -h, --help show this help message and exit --bandwidth=BANDWIDTH Bytes / second to rate limit to --block-size=BLOCK_SIZE bytes to read at a time (1K default). Bigger may mean less cpu usage, especially for high bandwidth, low latency throttlings. Try 65536 if you want to bump this up. --input-file=INPUT_FILE file to read from (default stdin) --output-file=OUTPUT_FILE file to write to (default stdout) ``` Example: `cat largefile.txt | python throttle.py --bandwidth 1048576 > largefile2.txt` would write largefile.txt to largefile2.txt at the rate of 1MB/s