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

Output Unit "Byte" for tikv-ctl #3421

Merged
merged 5 commits into from Aug 10, 2018
Merged

Output Unit "Byte" for tikv-ctl #3421

merged 5 commits into from Aug 10, 2018

Conversation

smallyard
Copy link
Contributor

What have you changed? (mandatory)

Output Unit "Byte" for tikv-ctl

What are the type of the changes? (mandatory)

Improvement

How has this PR been tested? (mandatory)

manual tests

Does this PR affect documentation (docs/docs-cn) update? (mandatory)

no

Does this PR affect tidb-ansible update? (mandatory)

no

Refer to a related PR or issue link (optional)

#3186

@sre-bot
Copy link
Contributor

sre-bot commented Aug 9, 2018

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@@ -1805,7 +1805,7 @@ fn convert_gbmb(mut bytes: u64) -> String {
const GB: u64 = 1024 * 1024 * 1024;
const MB: u64 = 1024 * 1024;
if bytes < MB {
return bytes.to_string();
return format!("{} Byte ", bytes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about write the logic in convert_gbmb?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think {} B is enough. see https://en.wikipedia.org/wiki/File_size

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddontang OK, I changed unit Byte to B.

Hoverbear
Hoverbear previously approved these changes Aug 9, 2018
@Hoverbear Hoverbear added the type/enhancement Type: Issue - Enhancement label Aug 9, 2018
@Hoverbear
Copy link
Contributor

@smallyard Thank you for this patch! :)

zhangjinpeng87
zhangjinpeng87 previously approved these changes Aug 10, 2018
Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

hicqu
hicqu previously approved these changes Aug 10, 2018
@hicqu
Copy link
Contributor

hicqu commented Aug 10, 2018

Please add a new commit log to pass DCO check.

Signed-off-by: hqliu <hqliu@mobvoi.com>
@smallyard
Copy link
Contributor Author

@hicqu I add a commit whih argument -s, but the check still not pass.

Copy link
Contributor

@siddontang siddontang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@siddontang
Copy link
Contributor

@zhangjinpeng1987 please approve it

@breezewish breezewish merged commit 5cb6355 into tikv:master Aug 10, 2018
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
@sre-bot sre-bot added the contribution Type: PR - From contributors label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Type: PR - From contributors type/enhancement Type: Issue - Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants