prometheus/scrape
Bryan Boreham f6d9c84fde
scraping: delay creating buffer, to save memory (#12953)
We don't need the buffer to read the response until the scrape http call
returns; creating it earlier makes the buffer pool larger.

I split `scrape()` into `scrape()` which returns with the http response,
and `readResponse()` which decompresses and copies the data into the
supplied buffer. This design was chosen to minimize impact on the logic.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-10-09 17:23:53 +01:00
..
testdata
clientprotobuf.go
helpers_test.go scrape: Refactor names of float samples 2023-07-13 14:27:51 +02:00
manager.go scraping: limit detail on dropped targets, to save memory (#12647) 2023-08-14 15:39:25 +01:00
manager_test.go
scrape.go scraping: delay creating buffer, to save memory (#12953) 2023-10-09 17:23:53 +01:00
scrape_test.go scraping: delay creating buffer, to save memory (#12953) 2023-10-09 17:23:53 +01:00
target.go
target_test.go