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

feat(cli): print stats/errors breakdown by host #7296

Merged

Conversation

swist
Copy link
Member

@swist swist commented Mar 25, 2021

Description

This teaches the CLI to print statistics broken down by host if available. It also teaches the CLI to always display stats as a table.

Testing done

Used approval tests (which is why this needs to go in after #7293 )
For local stats only it looks like this:

Local runtime statistics
 -------------------------
  Host | Metric | Value      | Last Message             
 -------------------------------------------------------
  --   | ERROR  |          0 | 2020-08-05T16:28:56.314Z 
  --   | TEST   |          0 | 2020-08-05T16:28:56.314Z 
 -------------------------------------------------------

When data from other nodes is present it looks like so:

Runtime statistics by host
 -------------------------
  Host       | Metric | Value      | Last Message             
 -------------------------------------------------------------
  host1:8001 | ERROR  |          0 | 2020-08-05T16:28:56.314Z 
  host1:8001 | TEST   |          0 | 2020-08-05T16:28:56.314Z 
  host2:8002 | ERROR  |          0 | 2020-08-05T16:28:56.314Z 
  host2:8002 | TEST   |          0 | 2020-08-05T16:28:56.314Z 
  host3:8003 | ERROR  |          0 | 2020-08-05T16:28:56.314Z 
  host3:8003 | TEST   |          0 | 2020-08-05T16:28:56.314Z 
  host4:8004 | ERROR  |          0 | 2020-08-05T16:28:56.314Z 
  host4:8004 | TEST   |          0 | 2020-08-05T16:28:56.314Z 
 -------------------------------------------------------------

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@swist swist requested a review from a team as a code owner March 25, 2021 14:05
@ghost
Copy link

ghost commented Mar 25, 2021

@confluentinc It looks like @swist just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@swist swist force-pushed the kci-206/handle-cluster-wide-stats-in-cli branch 2 times, most recently from d7a3472 to cec3172 Compare March 25, 2021 17:01
@swist swist force-pushed the kci-206/handle-cluster-wide-stats-in-cli branch 6 times, most recently from 745a327 to 9db3c2e Compare March 26, 2021 11:15
@swist swist force-pushed the kci-206/handle-cluster-wide-stats-in-cli branch from 9db3c2e to 30aeee3 Compare March 26, 2021 12:12
@swist swist merged commit 20a4ea5 into confluentinc:master Mar 26, 2021
@swist swist deleted the kci-206/handle-cluster-wide-stats-in-cli branch March 26, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants