Skip to content

Commit

Permalink
move metrics
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed May 9, 2024
1 parent 101869a commit d825100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/schedule/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ func (c *Coordinator) startPatrolRegionWorkers(workers int, regionChan <-chan *c
go func() {
defer wg.Done()
for {
patrolCheckRegionsChanLenGauge.Set(float64(len(regionChan)))
select {
case region, ok := <-regionChan:
if ok {
Expand All @@ -255,7 +256,6 @@ func (c *Coordinator) startPatrolRegionWorkers(workers int, regionChan <-chan *c
// waitDrainRegionChan is used to drain the regionChan.
// It is used to avoid duplicated regions in the regionChan from different sources.
func (c *Coordinator) waitDrainRegionChan(regionChan chan *core.RegionInfo) {
patrolCheckRegionsChanLenGauge.Set(float64(len(regionChan)))
if len(regionChan) == 0 {
return
}
Expand Down

0 comments on commit d825100

Please sign in to comment.