bandwidth is a little package to be used in collecting and reporting on bandwidth numbers.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Stephen McQuay 9afe8cd2ae removed false documentation about memory leak. il y a 4 ans
bandwidth.go removed false documentation about memory leak. il y a 4 ans
bandwidth_test.go Fixed the memory leaks using circular buffer. il y a 5 ans
license changed license il y a 4 ans
readme.md started readme il y a 5 ans

readme.md

bandwidth

bandwidth is a little package to be used in collecting and reporting on bandwidth numbers.

It is intended to be used as such:

    // report on 1, 10, 60 second intervals, update every 100 milliseconds
	bw, _ := NewBandwidth([]int{1, 10, 60}, 100*time.Millisecond)
	go bw.Run()
	bw.AddRx <- 10
	bw.AddTx <- 10
	time.Sleep(1 * time.Second)
	log.Printf("%+v", <-bw.Rx)
    log.Printf("%+v", <-bw.Tx)