I think get BandWidth is error
chichangjing1 opened this issue · comments
chichangjing1 commented
Your environment.
- Version: SHA:3e913c713bbe7cc15da000b7b2040094d8c53825
- Browser: v0.4.0
- Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context
What did you do?
-
file:client.go
func (c *Client) getBandWidth(cycle int) (int, int) {
var recvBW, sendBW int
if c.producer != nil {
sendBW = c.producer.GetSendBandwidth(cycle)
}recvBW = c.recvByte / cycle / 1000
c.recvByte = 0
return recvBW, sendBW
} -
file:webmproducer.go
// GetSendBandwidth calc the sending bandwidth with cycle(s)
func (t *WebMProducer) GetSendBandwidth(cycle int) int {
bw := t.sendByte / cycle / 1000
t.sendByte = 0
return bw
} -
fixed
recvBW = c.recvByte / cycle / 1024
bw := t.sendByte / cycle / 1024
What did you expect?
What happened?
adwpc commented
Thanks , 1024 is right