2015-09-30 23:15:53 -07:00
2015-09-30 23:15:53 -07:00
2015-09-30 23:15:53 -07:00
2015-09-30 23:15:53 -07:00
2015-06-22 19:32:30 -07:00

bps

bps is used to keep track of rates

It is intended to be used as such:

// report on 1, 10, 60 second intervals, update every second
bw, _ := NewBandwidth([]int{1, 10, 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.Cur())
S
Description
bps is used to keep track of bandwidth rates
https://godoc.org/mcquay.me/bps
Readme
60 KiB
Languages
Go 100%