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

[Question] How can i use speed about MiB/s and not p/s #164

Open
liangyuanpeng opened this issue Aug 22, 2020 · 3 comments
Open

[Question] How can i use speed about MiB/s and not p/s #164

liangyuanpeng opened this issue Aug 22, 2020 · 3 comments

Comments

@liangyuanpeng
Copy link

Thanks for your working of pb, it's great repo.

I have a question about speed:

How can i use speed about MiB/s and not p/s.

Thanks any help!

@cheggaaa
Copy link
Owner

Thank you!
For v3: bar.Set(pb.Bytes, true) or bar.Set(pb.SIBytesPrefix, true)
For v1: bar.SetUnits(pb.U_BYTES)

@cheggaaa
Copy link
Owner

cheggaaa commented Aug 24, 2020

Oh, sorry, you want to remove "p/s"
In the template, speed element must be {{speed . "%s"}} or {{speed . "%s something instead p/s"}}

@dveeden
Copy link

dveeden commented Apr 15, 2021

I tried this in pingcap/tiup#1312 and I had to use {{speed . "%%s/s"}} to get "MiB/s" instead of "MiB p/s". I think this resolves this issue/question.

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

3 participants