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 Re-generate test cert to fix test_windows test failures 2022-03-17 19:37:18 +01:00
clientprotobuf.go Update according to code review 2023-05-05 02:33:00 +08:00
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 Fix wording from "jitterSeed" -> "offsetSeed" for server-wide scrape offsets 2023-05-25 11:54:00 +02:00
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 Rename remaining jitterSeed -> offsetSeed variables (#12414) 2023-06-05 17:36:11 +02:00
target_test.go Fix wording from "jitterSeed" -> "offsetSeed" for server-wide scrape offsets 2023-05-25 11:54:00 +02:00