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

CASSANDRA-19015 Nodetool 'tablestats' formatting uses inconsistent significant digits #2919

Closed
wants to merge 10 commits into from

Conversation

zaaath
Copy link
Contributor

@zaaath zaaath commented Nov 19, 2023

Before

Nodetool reports milliseconds (ms) with anywhere from 3 to 15 significant digits. Ratios use five or sixteen decimal places. Averages use 1 or 13 decimal places.
Example:

Keyspace: system
        Read Count: 18
        Read Latency: 5.364611111111111 ms
        Write Count: 22
        Write Latency: 0.6970454545454545 ms
        Pending Flushes: 0
                Table: IndexInfo
...
                SSTable Compression Ratio: 1.14583
...
                Local read count: 1
                Local read latency: 17.084 ms
                Local write count: 1
                Local write latency: 1.916 ms
                Local read/write ratio: 1.00000
...
                Bloom filter false ratio: 0.00000
...
                Average live cells per slice (last five minutes): 1.0
                Maximum live cells per slice (last five minutes): 1
                Average tombstones per slice (last five minutes): 1.0
                Maximum tombstones per slice (last five minutes): 1
                Droppable tombstone ratio: 0.00000

After

Milliseconds use 3 decimal places
Ratios use 3 decimal places (tenths of a percent)
Averages use 2 decimal places
Example:

Keyspace: system
        Read Count: 18
        Read Latency: 5.084 ms
        Write Count: 22
        Write Latency: 0.566 ms
        Pending Flushes: 0
                Table: IndexInfo
...
                SSTable Compression Ratio: 1.146
...
                Local read count: 1
                Local read latency: 14.237 ms
                Local write count: 1
                Local write latency: 0.770 ms
                Local read/write ratio: 1.000
...
                Bloom filter false ratio: 0.000
...
                Average live cells per slice (last five minutes): 61.43
                Maximum live cells per slice (last five minutes): 72
                Average tombstones per slice (last five minutes): 1.00
                Maximum tombstones per slice (last five minutes): 1
                Droppable tombstone ratio: 0.000

How to reproduce

nodetool tablestats

Tests

ant testsome -Dtest.name=org.apache.cassandra.utils.FBUtilitiesTest
ant testsome -Dtest.name=org.apache.cassandra.tools.nodetool.stats.TableStatsPrinterTest
ant testsome -Dtest.name=org.apache.cassandra.tools.nodetool.TableStatsTest

patch by @zaaath; reviewed by @smiklosovic for CASSANDRA-19015

@smiklosovic smiklosovic closed this Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants