Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I think get BandWidth is error #32

Open
chichangjing1 opened this issue May 13, 2021 · 1 comment
Open

I think get BandWidth is error #32

chichangjing1 opened this issue May 13, 2021 · 1 comment

Comments

@chichangjing1
Copy link

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
Copy link
Contributor

adwpc commented May 25, 2021

Thanks , 1024 is right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants