From: Taylor Blau <me@ttaylorr.com>
To: Jonny Grant <jg@jguk.org>
Cc: git@vger.kernel.org
Subject: Re: Consider dropping the decimal places for KiB/s 52.00 KiB/s
Date: Thu, 30 Nov 2023 14:07:22 -0500 [thread overview]
Message-ID: <ZWjdatp3SRb4mN6G@nand.local> (raw)
In-Reply-To: <637be919-0b04-4e5c-8f2e-43340521e6d1@jguk.org>
On Thu, Nov 30, 2023 at 06:11:57PM +0000, Jonny Grant wrote:
> Hello
>
> May I suggest taking off the .00 KiB/s suffix, has that been
> considered? As the decimal places don't appear to change, they're
> stuck on .00.
I wonder if you have a throttled connection that is locked to 52KiB/s
exactly. The progress code that generates the throughput is in
progress.c::display_throughput(), which computes the rate. It's computed
in bytes/misec, and then passed to throughput_string() (really,
`strbuf_humanise_rate()`), which formats it appropriately.
If you're in the KiB range, it will print the decimal component, which
is:
((bytes & ((1<<10)-1)) * 100) >> 10
> $ git clone git://gcc.gnu.org/git/gcc.git git_1
> Cloning into 'git_1'...
> remote: Enumerating objects: 2949348, done.
> remote: Counting objects: 100% (209238/209238), done.
> remote: Compressing objects: 100% (14579/14579), done.
> Receiving objects: 7% (210878/2949348), 76.33 MiB | 52.00 KiB/s
On my machine:
$ git.compile clone git://gcc.gnu.org/git/gcc.git
[...]
Receiving objects: 11% (342176/2949348), 108.09 MiB | 24.01 MiB/s
I suppose we could consider dropping the decimal component if it's a
round number, but I think that it may produce awkward flickering if the
rate oscillates between a round number and a non-round number.
Thanks,
Taylor
next prev parent reply other threads:[~2023-11-30 19:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 18:11 Consider dropping the decimal places for KiB/s 52.00 KiB/s Jonny Grant
2023-11-30 19:07 ` Taylor Blau [this message]
2023-11-30 19:28 ` Dragan Simic
2023-11-30 20:19 ` Jonny Grant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWjdatp3SRb4mN6G@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=jg@jguk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).