mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #12939 from bboreham/hoist-scrape-labels
scraping: hoist labels variable to save garbage
This commit is contained in:
commit
b8f8c3c277
|
@ -1525,6 +1525,7 @@ func (sl *scrapeLoop) append(app storage.Appender, b []byte, contentType string,
|
||||||
appErrs = appendErrors{}
|
appErrs = appendErrors{}
|
||||||
sampleLimitErr error
|
sampleLimitErr error
|
||||||
bucketLimitErr error
|
bucketLimitErr error
|
||||||
|
lset labels.Labels // escapes to heap so hoisted out of loop
|
||||||
e exemplar.Exemplar // escapes to heap so hoisted out of loop
|
e exemplar.Exemplar // escapes to heap so hoisted out of loop
|
||||||
meta metadata.Metadata
|
meta metadata.Metadata
|
||||||
metadataChanged bool
|
metadataChanged bool
|
||||||
|
@ -1622,7 +1623,6 @@ loop:
|
||||||
ce, ok := sl.cache.get(met)
|
ce, ok := sl.cache.get(met)
|
||||||
var (
|
var (
|
||||||
ref storage.SeriesRef
|
ref storage.SeriesRef
|
||||||
lset labels.Labels
|
|
||||||
hash uint64
|
hash uint64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue