-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: fetch and visualize server metrics
This commit adds the `--type=metric` option to the `kes log trace` command. When the `metric` type is specified then the CLI will fetch the server metrics periodically and either output a nd-JSON stream of metrics or display the metrics in a table-like view: ``` ┌───────────┬───────────┬───────────┬───────────┬───────────┬───────────┬───────────┬───────────┬───────────┬───────────┐ │ 0-10ms │ 10-50ms │ 50-100ms │ 100-250ms │ 250-500ms │ 500ms-1s │ 1-1.5s │ 1.5-3s │ 3-5s │ 5-10s │ ├───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┼───────────┤ │ 219489 │ 803 │ 114 │ 89 │ 75 │ 27 │ 6 │ 19 │ 2 │ 3 │ └───────────┴───────────┴───────────┴───────────┴───────────┴───────────┴───────────┴───────────┴───────────┴───────────┘ Active : 0 Success: 98.07% | 216378 Error : 01.93% | 4249 Failure: 00.00% | 0 UpTime : 92h40m47s ``` When standard output is not a terminal or when the `--json` flag is specified then `kes log trace --type=metric` outputs the metrics as JSON.
- Loading branch information
1 parent
75c2cc4
commit 6b23973
Showing
3 changed files
with
177 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters