bps is used to keep track of bandwidth rates https://godoc.org/mcquay.me/bps
Go to file
Stephen McQuay 561fc4300f don't show docs for human 2015-09-30 23:15:57 -07:00
bandwidth.go don't show docs for human 2015-09-30 23:15:57 -07:00
bandwidth_test.go Added HumanRate 2015-09-30 23:15:53 -07:00
bytes.go don't show docs for human 2015-09-30 23:15:57 -07:00
license fixed author name 2015-09-30 23:15:57 -07:00
readme.md fxed readme 2015-09-30 23:15:57 -07:00

readme.md

bps

bps is used to keep track of rates

It is intended to be used as such:

// report on the rate over a 60 second interval, update every second
bw, _ := New(60*time.Second, 60)
bw.Add(10)
b := &bytes.Buffer{}
b.Write([]byte("helloooooooooooooooooooooooooooooooooooooooooooooo"))
io.Copy(bw, b)
time.Sleep(1 * time.Second)
log.Printf("%+v", bw.HumanRate())