Skip to content

perf: list nodes for the metrics scrape without their resource info - #749

Merged
CMGS merged 1 commit into
masterfrom
perf/scrape-without-resources
Sep 9, 2026
Merged

CMGS merged 1 commit into
masterfrom
perf/scrape-without-resources

Conversation

@CMGS

@CMGS CMGS commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What

ListNodesOptions gains WithoutResourceInfo; ListPodNodes skips the plugin fan-out when it is set, and the metrics middleware lists with it. The scrape only needs each node's name and pod: the plugins read their own stores in GetNodesMetrics.

Why

Listing with resource info asked every plugin for every node on each scrape and discarded the answer: two plugin processes per scrape with the plural verb, one per node per plugin without it.

Evidence

TestListPodNodes pins that the manager is not called with the option set; TestResourceMiddlewareRefreshesEveryNodeInOneCall pins that the middleware passes it. Gate on the branch: build, vet, full tests, make lint, make fmt-check and asl on both GOOS green; comment delta +0 −0; production +11 −5.

The scrape only needs each node's name and pod; the plugins read their
own stores in GetNodesMetrics. Listing with resource info asked every
plugin for every node on each scrape and discarded the answer, two
plugin processes per scrape with the plural verb and one per node per
plugin without it.
@CMGS
CMGS merged commit 6d22fed into master Sep 9, 2026
7 checks passed
@CMGS
CMGS deleted the perf/scrape-without-resources branch September 9, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant