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

benchmark recurseKustomizationFiles() #622

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

darkowlzz
Copy link
Contributor

Add benchmark for recurseKustomizationFiles() to measure the performance
of recursively loading kustomization files with certain percentage of
symlinks in the kustomizations.
Follow up of #619 .

Benchmark results for 10/100/1000/10000 kustomization nodes and 10/80 % of them
as symlinks:

goos: linux
goarch: amd64
pkg: github.com/fluxcd/kustomize-controller/controllers
cpu: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
BenchmarkRecKust10Nodes10pcSymlink
BenchmarkRecKust10Nodes10pcSymlink-16               3612            338960 ns/op
BenchmarkRecKust10Nodes80pcSymlink
BenchmarkRecKust10Nodes80pcSymlink-16               3486            352937 ns/op
BenchmarkRecKust100Nodes10pcSymlink
BenchmarkRecKust100Nodes10pcSymlink-16               362           3525207 ns/op
BenchmarkRecKust100Nodes80pcSymlink
BenchmarkRecKust100Nodes80pcSymlink-16               334           3516026 ns/op
BenchmarkRecKust1000Nodes10pcSymlink
BenchmarkRecKust1000Nodes10pcSymlink-16               36          34954831 ns/op
BenchmarkRecKust1000Nodes80pcSymlink
BenchmarkRecKust1000Nodes80pcSymlink-16               30          37354662 ns/op
BenchmarkRecKust10000Nodes10pcSymlink
BenchmarkRecKust10000Nodes10pcSymlink-16               3         382599694 ns/op
BenchmarkRecKust10000Nodes80pcSymlink
BenchmarkRecKust10000Nodes80pcSymlink-16               3         382828839 ns/op

Add benchmark for recurseKustomizationFiles() to measure the performance
of recursively loading kustomization files with certain percentage of
symlinks in the kustomizations.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
return nil
}

b.StartTimer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also report on allocs so we can grasp the impact as the code changes?

Suggested change
b.StartTimer()
b.StartTimer()
b.ReportAllocs()

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great initiative @darkowlzz, looking forward to some benchmarks across the project. 🚀 🎉

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.

2 participants