Fix comment

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto 2020-10-06 13:48:24 +02:00
parent 98e14611a5
commit ccc1df3140

View file

@ -1010,7 +1010,7 @@ mainLoop:
// See https://github.com/prometheus/prometheus/issues/7846 // See https://github.com/prometheus/prometheus/issues/7846
scrapeTime := time.Now() scrapeTime := time.Now()
if interval > 100*scrapeTimestampTolerance { if interval > 100*scrapeTimestampTolerance {
// For some reason, a ticker might have been skipped, in which case we // For some reason, a tick might have been skipped, in which case we
// would call alignedScrapeTime.Add(interval) multiple times. // would call alignedScrapeTime.Add(interval) multiple times.
for scrapeTime.Sub(alignedScrapeTime) >= interval { for scrapeTime.Sub(alignedScrapeTime) >= interval {
alignedScrapeTime = alignedScrapeTime.Add(interval) alignedScrapeTime = alignedScrapeTime.Add(interval)