pb icon indicating copy to clipboard operation
pb copied to clipboard

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

Open liangyuanpeng opened this issue 4 years ago • 3 comments

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!

liangyuanpeng avatar Aug 22 '20 17:08 liangyuanpeng

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

cheggaaa avatar Aug 24 '20 13:08 cheggaaa

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

cheggaaa avatar Aug 24 '20 13:08 cheggaaa

I tried this in https://github.com/pingcap/tiup/pull/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.

dveeden avatar Apr 15 '21 06:04 dveeden