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.x](backport #6028) Add var generation benchmark #6051

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 18, 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 added the backport label Nov 18, 2024
@mergify mergify bot requested a review from a team as a code owner November 18, 2024 12:16
@mergify mergify bot requested review from michalpristas and pchila and removed request for a team November 18, 2024 12:16
@swiatekm swiatekm enabled auto-merge (squash) November 18, 2024 12:19
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

@swiatekm swiatekm merged commit 52e7957 into 8.x Nov 18, 2024
14 of 15 checks passed
@swiatekm swiatekm deleted the mergify/bp/8.x/pr-6028 branch November 18, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant