[ 
https://issues.apache.org/jira/browse/CASSANDRA-18334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700702#comment-17700702
 ] 

Josh McKenzie commented on CASSANDRA-18334:
-------------------------------------------

We could probably make {{FBUtilities.prettyPrintMemory}} a little smarter in 
this regard and configurable for region in the .yaml right?

{code}
    public static String prettyPrintMemory(long size, boolean includeSpace)
    {
        if (size >= 1 << 30)
            return String.format("%.3f%sGiB", size / (double) (1 << 30), 
includeSpace ? " " : "");
        if (size >= 1 << 20)
            return String.format("%.3f%sMiB", size / (double) (1 << 20), 
includeSpace ? " " : "");
        return String.format("%.3f%sKiB", size / (double) (1 << 10), 
includeSpace ? " " : "");
    }
{code}

> Change "Cleaned up" log message slightly
> ----------------------------------------
>
>                 Key: CASSANDRA-18334
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18334
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Observability/Logging
>            Reporter: Lapo Luchini
>            Priority: Normal
>
> Might seem like a very small change, but it leads me to confusion each and 
> every time. 🤣
> I propose to change current message like:
> {{Cleaned up to /var/db/cassandra/data/…/me-19423-big-Data.db. 571.512GiB to 
> 502.648GiB (~87% of original) for 11,708,552 keys. Time: 62,321,057 ms.}}
> To only 2 decimal places, to disambiguate the fact that the "." is a decimal 
> separator and not a thousands separator.
> {{Cleaned up to /var/db/cassandra/data/…/me-19423-big-Data.db. 571.51GiB to 
> 502.65GiB (~87% of original) for 11,708,552 keys. Time: 62,321,057 ms.}}
> I guess this happens less in the USA or countries where "." is always and 
> only a decimal separator, but e.g. in Italy we use numbers usually like this 
> "1.000,345" and thus, while accustomed to many values in the "international" 
> format the period is a bit overloaded in my brain and I always am like "is 
> that 571 and a half GiB, again?"
> Changing to two digits would help in that regard and, I think, only removes 
> extra detail which was kinda overkill in the first place.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to