Merge pull request #12939 from bboreham/hoist-scrape-labels

scraping: hoist labels variable to save garbage
pull/12944/head
Bryan Boreham 1 year ago committed by GitHub
commit b8f8c3c277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1525,6 +1525,7 @@ func (sl *scrapeLoop) append(app storage.Appender, b []byte, contentType string,
appErrs = appendErrors{}
sampleLimitErr 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
meta metadata.Metadata
metadataChanged bool
@ -1622,7 +1623,6 @@ loop:
ce, ok := sl.cache.get(met)
var (
ref storage.SeriesRef
lset labels.Labels
hash uint64
)

Loading…
Cancel
Save