## Enhancement add metric for dispatcher and scheduler, eg: how many tasks are scheduled, scheduling ## Grafana ### Dispatcher - [x] A line chart showing the change in the number of waiting/running/cancelling/reverting tasks over time - [x] A line chart showing the waiting time of waiting tasks - [x] A line chart showing the dispatch time of dispatching tasks ### Runtime - Scheduler SubTask - [x] A line chart showing the change in the number of waiting subTasks over time - [x] A line chart showing the waiting time of waiting subTasks - [x] A line chart showing the run time of running subTasks ### TiDB perspective - [x] A pie chart showing the distribution of all current subTasks on various TiDB nodes ### Task perspective - [x] A line chart showing the change in the number of each Task's (uncompleted/completed) subTasks over time - [x] A line chart showing the average rate of each Task (subTask count/hour, which can later be improved to rows/s or bytes/s) ### SubTask perspective - [x] A line chart showing the average running speed of subTasks on different TiDB nodes (subTask count/hour) ## Metrics - [x] dispatch(DDL owner)(for each task, lable: "task_type"=xxxx) - [x] Waiting tasks (lable: "status"="waiting") - [x] How many - [x] Duration (lable: "task_id"=xxxx) - [x] Dispatching tasks (lable: "status"="dispatching") - [x] Duration (lable: "task_id"=xxxx) - [x] Running tasks (lable: "status"="running") - [x] Completed tasks (lable: "status"="completed") - [x] Reverting tasks (lable: "status"="reverting") - [x] Canceling tasks (lable: "status"="canceling") - [x] Scheduler - [x] For each scheduler/each TiDB node (lable: "task_id"=xxxx, "task_type"=xxxx, "scheduler_id"=xxxx, "tidb_id"=xxxx) - [x] Running subTask (lable: "status"="running") - [x] Duration (lable: "subtask_id"=xxxx) - [x] Waiting subTask (lable: "status"="waiting") - [x] How many - [x] Duration (lable: "subtask_id"=xxxx)
Enhancement
add metric for dispatcher and scheduler, eg: how many tasks are scheduled, scheduling
Grafana
Dispatcher
Runtime - Scheduler SubTask
TiDB perspective
Task perspective
SubTask perspective
Metrics