Skip to content

Commit

Permalink
fix: fix ping metrics #99
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Apr 19, 2022
1 parent 10a9996 commit 13c5864
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/web/ping_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (pg *PingGroup) Collect(ch chan<- prometheus.Metric) {
}

func (pg *PingGroup) Run() {
if len(pg.Pingers) <= 0 {
return
}
splay := time.Duration(pingInterval.Nanoseconds() / int64(len(pg.Pingers)))
logger.Infof("[ping] Waiting %s between starting pingers", splay)
for idx := range pg.Pingers {
Expand Down

0 comments on commit 13c5864

Please sign in to comment.