Bug: Nodetool tpstats formatting / grouping to make more logical output
Status: Triage Needed
Priority: Normal
Created: 29/Apr/20 14:46

The new messaging format for Cassandra 4.0 outlined in CASSANDRA-15066 introduces a lot more info into the output of {{nodetool tpstats}} output. 

It would be useful to output this in groups like it is listed in the enum in the code here:

[https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/net/Verb.java]

At the moment (4.0-alpha5-SNAPSHOT) the output doesn't appear to be ordered.

I did notice CASSANDRA-12035 but it seems this is only in 3.11 ?
h3. Example output

 
{code:java}
Pool Name                         Active   Pending      Completed   Blocked  All time blocked
CompactionExecutor                     0         0           6811         0                 0
MemtableReclaimMemory                  0         0             26         0                 0
PendingRangeCalculator                 0         0              8         0                 0
GossipStage                            0         0          33919         0                 0
SecondaryIndexManagement               0         0              0         0                 0
HintsDispatcher                        0         0              0         0                 0
Repair-Task                            0         0              0         0                 0
RequestResponseStage                   0         0              1         0                 0
MigrationStage                         0         0              8         0                 0
MemtablePostFlush                      0         0             33         0                 0
PerDiskMemtableFlushWriter_0           0         0             26         0                 0
ValidationExecutor                     0         0              0         0                 0
Sampler                                0         0              0         0                 0
ViewBuildExecutor                      0         0              0         0                 0
MemtableFlushWriter                    0         0             26         0                 0
CacheCleanupExecutor                   0         0              0         0                 0Message type           Dropped                  Latency waiting in queue (micros)
                                             50%               95%               99%               Max
READ_RSP                     0              0.00              0.00              0.00              0.00
RANGE_REQ                    0              0.00              0.00              0.00              0.00
PING_REQ                     0              0.00              0.00              0.00              0.00
_SAMPLE                      0              0.00              0.00              0.00              0.00
VALIDATION_RSP               0              0.00              0.00              0.00              0.00
SCHEMA_PULL_RSP              0              0.00              0.00              0.00              0.00
SYNC_RSP                     0              0.00              0.00              0.00              0.00
SCHEMA_VERSION_REQ           0              0.00              0.00              0.00              0.00
HINT_RSP                     0              0.00              0.00              0.00              0.00
BATCH_REMOVE_RSP             0              0.00              0.00              0.00              0.00
PAXOS_COMMIT_REQ             0              0.00              0.00              0.00              0.00
SNAPSHOT_RSP                 0              0.00              0.00              0.00              0.00
COUNTER_MUTATION_REQ         0              0.00              0.00              0.00              0.00
GOSSIP_DIGEST_SYN            0           1955.67           4055.27           4866.32           4866.32
PAXOS_PREPARE_REQ            0              0.00              0.00              0.00              0.00
PREPARE_MSG                  0              0.00              0.00              0.00              0.00
PAXOS_COMMIT_RSP             0              0.00              0.00              0.00              0.00
HINT_REQ                     0              0.00              0.00              0.00              0.00
BATCH_REMOVE_REQ             0              0.00              0.00              0.00              0.00
STATUS_RSP                   0              0.00              0.00              0.00              0.00
READ_REPAIR_RSP              0              0.00              0.00              0.00              0.00
GOSSIP_DIGEST_ACK2           0           1955.67           4055.27           4866.32           4866.32
CLEANUP_MSG                  0              0.00              0.00              0.00              0.00
REQUEST_RSP                  0              0.00              0.00              0.00              0.00
TRUNCATE_RSP                 0              0.00              0.00              0.00              0.00
REPLICATION_DONE_RSP         0              0.00              0.00              0.00              0.00
SNAPSHOT_REQ                 0              0.00              0.00              0.00              0.00
ECHO_REQ                     0              0.00              0.00              0.00              0.00
PREPARE_CONSISTENT_REQ         0              0.00              0.00              0.00              0.00
FAILURE_RSP                  0              0.00              0.00              0.00              0.00
BATCH_STORE_RSP              0              0.00              0.00              0.00              0.00
SCHEMA_PUSH_RSP              0              0.00              0.00              0.00              0.00
MUTATION_RSP                 0              0.00              0.00              0.00              0.00
FINALIZE_PROPOSE_MSG         0              0.00              0.00              0.00              0.00
ECHO_RSP                     0              0.00              0.00              0.00              0.00
INTERNAL_RSP                 0              0.00              0.00              0.00              0.00
FAILED_SESSION_MSG           0              0.00              0.00              0.00              0.00
_TRACE                       0              0.00              0.00              0.00              0.00
SCHEMA_VERSION_RSP           0              0.00              0.00              0.00              0.00
FINALIZE_COMMIT_MSG          0              0.00              0.00              0.00              0.00
SNAPSHOT_MSG                 0              0.00              0.00              0.00              0.00
PREPARE_CONSISTENT_RSP         0              0.00              0.00              0.00              0.00
PAXOS_PROPOSE_REQ            0              0.00              0.00              0.00              0.00
PAXOS_PREPARE_RSP            0              0.00              0.00              0.00              0.00
MUTATION_REQ                 0              0.00              0.00              0.00              0.00
READ_REQ                     0              0.00              0.00              0.00              0.00
PING_RSP                     0              0.00              0.00              0.00              0.00
RANGE_RSP                    0              0.00              0.00              0.00              0.00
VALIDATION_REQ               0              0.00              0.00              0.00              0.00
SYNC_REQ                     0              0.00              0.00              0.00              0.00
_TEST_1                      0              0.00              0.00              0.00              0.00
GOSSIP_SHUTDOWN              0              0.00              0.00              0.00              0.00
TRUNCATE_REQ                 0              0.00              0.00              0.00              0.00
_TEST_2                      0              0.00              0.00              0.00              0.00
GOSSIP_DIGEST_ACK            0           1629.72           4055.27           7007.51           7007.51
SCHEMA_PUSH_REQ              0              0.00              0.00              0.00              0.00
FINALIZE_PROMISE_MSG         0              0.00              0.00              0.00              0.00
BATCH_STORE_REQ              0              0.00              0.00              0.00              0.00
COUNTER_MUTATION_RSP         0              0.00              0.00              0.00              0.00
REPAIR_RSP                   0              0.00              0.00              0.00              0.00
STATUS_REQ                   0              0.00              0.00              0.00              0.00
SCHEMA_PULL_REQ              0              0.00              0.00              0.00              0.00
READ_REPAIR_REQ              0              0.00              0.00              0.00              0.00
ASYMMETRIC_SYNC_REQ          0              0.00              0.00              0.00              0.00
REPLICATION_DONE_REQ         0              0.00              0.00              0.00              0.00
PAXOS_PROPOSE_RSP            0              0.00              0.00              0.00              0.00{code}