From f09b46b2b13576b95bd566e752692b9c145373b8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 19 Feb 2021 00:33:37 +0200 Subject: [PATCH] lib/promscrape: typo fix after the commit f26162ec99e797a3acd7ac7d33ce68448baa117c --- lib/promscrape/scrapework.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/promscrape/scrapework.go b/lib/promscrape/scrapework.go index 82a064094..adff00c2c 100644 --- a/lib/promscrape/scrapework.go +++ b/lib/promscrape/scrapework.go @@ -193,7 +193,7 @@ func (sw *scrapeWork) run(stopCh <-chan struct{}) { // for a target with the same ScrapeURL and labels. key := fmt.Sprintf("ScrapeURL=%s, Labels=%s", sw.Config.ScrapeURL, sw.Config.LabelsString()) h := uint32(xxhash.Sum64([]byte(key))) - randSleep := uint64(float64(scrapeInterval) * (float64(h) / (1 << 32))) + randSleep = uint64(float64(scrapeInterval) * (float64(h) / (1 << 32))) sleepOffset := uint64(time.Now().UnixNano()) % uint64(scrapeInterval) if randSleep < sleepOffset { randSleep += uint64(scrapeInterval)