diff --git a/retrieval/scrape.go b/retrieval/scrape.go index 8fc27a662..b646c5d99 100644 --- a/retrieval/scrape.go +++ b/retrieval/scrape.go @@ -432,6 +432,7 @@ type scrapeLoop struct { // seriesCur and seriesPrev store the labels of series that were seen // in the current and previous scrape. + // We hold two maps and swap them out to save allocations. seriesCur map[string]labels.Labels seriesPrev map[string]labels.Labels