bps is used to keep track of bandwidth rates https://godoc.org/mcquay.me/bps
Go to file
2016-09-22 23:03:32 -07:00
bps_test.go Added BPS.Data to feed to sparklines 2016-02-27 23:03:42 -08:00
bps.go Added BPS.Data to feed to sparklines 2016-02-27 23:03:42 -08: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
multi.go added multi 2016-09-22 23:03:32 -07:00
readme.md Update godoc link 2016-09-22 23:03:32 -07:00

bps

GoDoc

bps is used to keep track of bandwidth 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)
bw.Add(10)
b := &bytes.Buffer{}
b.Write([]byte("helloooooooooooooooooooooooooooooooooooooooooooooo"))
io.Copy(bw, b)
time.Sleep(1 * time.Second)
log.Printf("%+v", bw.HumanRate())