bandwidth is a little package to be used in collecting and reporting on bandwidth numbers.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Stephen McQuay 9afe8cd2ae removed false documentation about memory leak. 4 anos atrás
bandwidth.go removed false documentation about memory leak. 4 anos atrás
bandwidth_test.go Fixed the memory leaks using circular buffer. 5 anos atrás
license changed license 4 anos atrás
readme.md started readme 5 anos atrás

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)