-
Notifications
You must be signed in to change notification settings - Fork 8.3k
An option for clickhouse-client to show realtime table with metrics. #39694
Description
Use case
Show what exactly the currently running query is doing.
Describe the solution you'd like
When a query is running, show a table below the progress bar.
This table will contain all the metrics with non-zero values, sorted alphabetically.
It should show the name of the metric, the current value, and:
- for counter-type metrics - the exponentially smoothed increment per second;
- for gauge-type metrics - the difference to the value one second ago;
If some gauge-type metric was non-zero but then becomes zero, it will still be displayed to avoid jitter.
The metrics changed should be highlighted in color (more relative change - more intense color).
The table should be redrawn in place.
When the query finished running, the table with the final values of the metrics should remain on screen.
For distributed queries, the table will display the summary across servers.
Additional context
We can also display the number of participating servers for every metric increment.
Another idea is to display the list of currently active thread names.
We can accompany metrics with some metadata in the code describing how to display the value - is it a value in bytes or in seconds, or in microseconds, etc.