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

Brad Schoening edited comment on CASSANDRA-19104 at 12/6/23 6:46 PM:
---------------------------------------------------------------------

Ok, I suppose for storage KiB might make sense as the lowest reportable units. 
Jacek's example is ambiguous, but I'd say with a leading zero before the 
decimal point, there should be three significant digits afterwards, so 0.000 
KiB (which is the maximum resolution available since bytes are unitary)

 
{noformat}
Example
Bytes repaired: 0.00 KiB
Bytes unrepaired: 4.31 TiB
Bytes pending repair: 0.000 KiB
{noformat}
>From Wikipedia [Significant 
>Figures|https://en.wikipedia.org/wiki/Significant_figures] 
{quote}[Leading zeros|https://en.wikipedia.org/wiki/Leading_zero]. For 
instance, 013 kg has two significant figures—1 and 3—while the leading zero is 
insignificant since it does not impact the mass indication; 013 kg is 
equivalent to 13 kg, rendering the zero unnecessary. Similarly, in the case of 
0.056 m, there are two insignificant leading zeros since 0.056 m is the same as 
56 mm, thus the leading zeros do not contribute to the length indication.
{quote}
For storage and bytes, we should probably use 0.001 KiB (one byte) and 0.000 
KiB (zero bytes), 0.01 KiB (10 bytes)


was (Author: bschoeni):
Ok, I suppose for storage KiB might make sense as the lowest reportable units. 
Jacek's example is ambiguous, but I'd say with a leading zero before the 
decimal point, there should be three significant digits afterwards, so 0.000 
KiB (which is the maximum resolution available since bytes are unitary)

 
{noformat}
Example
Bytes repaired: 0.00 KiB
Bytes unrepaired: 4.31 TiB
Bytes pending repair: 0.000 KiB
{noformat}
>From Wikipedia [Significant 
>Figures|https://en.wikipedia.org/wiki/Significant_figures] 
{quote}[Leading zeros|https://en.wikipedia.org/wiki/Leading_zero]. For 
instance, 013 kg has two significant figures—1 and 3—while the leading zero is 
insignificant since it does not impact the mass indication; 013 kg is 
equivalent to 13 kg, rendering the zero unnecessary. Similarly, in the case of 
0.056 m, there are two insignificant leading zeros since 0.056 m is the same as 
56 mm, thus the leading zeros do not contribute to the length indication.
{quote}
 

> Standardize tablestats formatting and data units
> ------------------------------------------------
>
>                 Key: CASSANDRA-19104
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19104
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/nodetool
>            Reporter: Brad Schoening
>            Assignee: Leo Toff
>            Priority: Normal
>
> Tablestats reports output in plaintext, JSON or YAML. The human readable 
> output currently has a mix of KiB, bytes with inconsistent spacing
> Considering simplifying and defaulting output to 'human readable'. Machine 
> readable output is available as an option and the current mixed output 
> formatting is neither friendly for human or machine reading.
> !image-2023-11-27-13-49-14-247.png!
> *Not a goal now (consider a follow up Jira):*
> Fix inconsistencies with KiB/MiB/GiB and KB/MB/GB formatting:
>  * gcstats - uses MB
>  * getcompactionthroughput - uses MB/s
>  * getstreamthroughput - uses MB/s
>  * info - uses MiB/GiB



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to