File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,15 @@ func (c *Controller) GetStatus() *spec.ControllerStatus {
51
51
clustersCnt := len (c .clusters )
52
52
c .clustersMu .RUnlock ()
53
53
54
+ queueSizes := make (map [int ]int , c .opConfig .Workers )
55
+ for workerID , queue := range c .clusterEventQueues {
56
+ queueSizes [workerID ] = len (queue .ListKeys ())
57
+ }
58
+
54
59
return & spec.ControllerStatus {
55
- LastSyncTime : atomic .LoadInt64 (& c .lastClusterSyncTime ),
56
- Clusters : clustersCnt ,
60
+ LastSyncTime : atomic .LoadInt64 (& c .lastClusterSyncTime ),
61
+ Clusters : clustersCnt ,
62
+ WorkerQueueSize : queueSizes ,
57
63
}
58
64
}
59
65
Original file line number Diff line number Diff line change @@ -102,8 +102,9 @@ type ClusterStatus struct {
102
102
103
103
// ControllerStatus describes status of the controller
104
104
type ControllerStatus struct {
105
- LastSyncTime int64
106
- Clusters int
105
+ LastSyncTime int64
106
+ Clusters int
107
+ WorkerQueueSize map [int ]int
107
108
}
108
109
109
110
// QueueDump describes cache.FIFO queue
You can’t perform that action at this time.
0 commit comments