curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Precision in the progress meter

From: Nicolas George via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 18 Nov 2025 20:58:38 +0100

Daniel Stenberg via curl-users (HE12025-11-10):
> (Posted to both lists for posterity, but strictly speaking this is a libcurl
> change so I prefer to have follow-ups there but I post on curl-users too
> since curl tool users are affected as well.)
>
> In curl 8.17.0 I modified the standard progress meter display to use one
> more character per size shown. Six instead of the previous five. And it
> would use decimals if the number is less than 1000.
>
> - 999999
> - 99999k
> - 99999M
> - 999.1G
>
> etc
>
> I did this because I thought added precision would be good. I was probably
> wrong. The added characters unfortunately made the numbers harder to read.
>
> So this is a call for everyone: what do you think?
>
> I'm trying to iprove the situation going forward by limiting the numbers
> slightly differently:
>
> Max 5 digits without a unit and only display numbers less than 1000 with
> units but then with a decimal (using a total of 6 characters):
>
> - 99999
> - 999.9k
> - 123.4M

Hi. Since nobody is answering, I can give my two cents.

I am not really seeing a difference between your two series of examples:
four significant digits plus decimal point plus unit prefix equals six
characters, one more significant digit when decimal point not necessary,
and one more when the prefix is absent.

A few considerations:

Two significant digits like coreutils does at it worst is not enough. I
think three significant digits starts to be enough. Four is absolutely
fine.

The fixed number of chars is important.

Avoid ≥5 digits in a row. Beyond 4, the eye can have trouble being sure
between 66666 and 666666 without thousand separators, and thousand
separators are awful.

On the other hand, prefer large numbers to small numbers with a decimal
point.

In other words (showing padding with an underscore):

        _9999K
        9.766M
        10.00M
        10.01M
        99.99M
        100.0M
        100.1M
        999.9M
        _1000M
        _9999M
        9.766G

Regards,

-- 
  Nicolas George
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-11-18