mirror of https://github.com/prometheus/prometheus
Merge pull request #1397 from prometheus/remove-old-scrapetime-setting
Remove old superfluous calls to setLastScrape().pull/1398/head
commit
1f70345d0c
|
@ -433,7 +433,6 @@ func (t *Target) RunScraper(sampleAppender storage.SampleAppender) {
|
||||||
ticker := time.NewTicker(lastScrapeInterval)
|
ticker := time.NewTicker(lastScrapeInterval)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
t.status.setLastScrape(time.Now())
|
|
||||||
t.scrape(sampleAppender)
|
t.scrape(sampleAppender)
|
||||||
|
|
||||||
// Explanation of the contraption below:
|
// Explanation of the contraption below:
|
||||||
|
@ -453,7 +452,6 @@ func (t *Target) RunScraper(sampleAppender storage.SampleAppender) {
|
||||||
return
|
return
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
took := time.Since(t.status.LastScrape())
|
took := time.Since(t.status.LastScrape())
|
||||||
t.status.setLastScrape(time.Now())
|
|
||||||
|
|
||||||
intervalStr := lastScrapeInterval.String()
|
intervalStr := lastScrapeInterval.String()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue