Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.15](backport #6028) Add var generation benchmark #6116

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 21, 2024

What does this PR do?

Add a benchmark for variable generation from provider mappings. We specifically profile having a lot of Pods from the Kubernetes provider, which is something that has recently become a problem, and which the configuration generation pipeline doesn't deal with very well. I used test data from a real environment where the problems outlined in #5991 and #5835 could be reproduced.

Results on main:

goos: linux
goarch: amd64
pkg: github.com/elastic/elastic-agent/internal/pkg/composable
cpu: 13th Gen Intel(R) Core(TM) i7-13700H
BenchmarkGenerateVars100Pods-20    	      74	  15310045 ns/op	10527199 B/op	  201283 allocs/op
BenchmarkGenerateVars100Pods-20    	      74	  15185648 ns/op	10514404 B/op	  201271 allocs/op
BenchmarkGenerateVars100Pods-20    	      86	  15126049 ns/op	10521262 B/op	  201277 allocs/op
BenchmarkGenerateVars100Pods-20    	      87	  15067870 ns/op	10514019 B/op	  201275 allocs/op
BenchmarkGenerateVars100Pods-20    	      85	  15032633 ns/op	10515568 B/op	  201274 allocs/op
BenchmarkGenerateVars100Pods-20    	      90	  15185170 ns/op	10525087 B/op	  201282 allocs/op
BenchmarkGenerateVars100Pods-20    	      75	  15345854 ns/op	10516840 B/op	  201274 allocs/op
BenchmarkGenerateVars100Pods-20    	      80	  15908398 ns/op	10518576 B/op	  201277 allocs/op
BenchmarkGenerateVars100Pods-20    	      73	  15623320 ns/op	10529545 B/op	  201284 allocs/op
BenchmarkGenerateVars100Pods-20    	      86	  15946078 ns/op	10533571 B/op	  201286 allocs/op
PASS
ok  	github.com/elastic/elastic-agent/internal/pkg/composable	12.832s

Why is it important?

I'd like to make some improvements to both the var generation and the configuration generation in the coordinator, and want a straightforward way of demonstrating their impact.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas

Related issues


This is an automatic backport of pull request #6028 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner November 21, 2024 12:54
@mergify mergify bot added the backport label Nov 21, 2024
@mergify mergify bot requested review from blakerouse and andrzej-stencel and removed request for a team November 21, 2024 12:54
@swiatekm swiatekm enabled auto-merge (squash) November 21, 2024 12:55
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Nov 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@swiatekm swiatekm merged commit 1672605 into 8.15 Nov 21, 2024
13 checks passed
@swiatekm swiatekm deleted the mergify/bp/8.15/pr-6028 branch November 21, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants