Skip to content

Add additional benchmarks for "updates" #125

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

Merged

Conversation

apelisse
Copy link
Contributor

@apelisse apelisse commented Nov 5, 2019

We currently were mostly benchmarking creation, apply but not updates,
nor any updates across versions. These new tests show that updates are
extremely expensive for objects that have big "atomic" values because
the comparison is pretty slow.

pkg: sigs.k8s.io/structured-merge-diff/merge
BenchmarkDeducedSimple-12                             	   10000	    102086 ns/op	   33768 B/op	     570 allocs/op
BenchmarkDeducedNested-12                             	    3000	    375675 ns/op	  103168 B/op	    1910 allocs/op
BenchmarkDeducedNestedAcrossVersion-12                	    3000	    407410 ns/op	  106689 B/op	    1978 allocs/op
BenchmarkLeafConflictAcrossVersion-12                 	   20000	     91036 ns/op	   31151 B/op	     505 allocs/op
BenchmarkMultipleApplierRecursiveRealConversion-12    	    1000	   1604863 ns/op	  508926 B/op	    5180 allocs/op
BenchmarkOperations/Pod/Create-12                     	   10000	    106094 ns/op	   17622 B/op	     255 allocs/op
BenchmarkOperations/Pod/Apply-12                      	    5000	    282660 ns/op	   58181 B/op	     710 allocs/op
BenchmarkOperations/Pod/Update-12                     	   10000	    192032 ns/op	   26522 B/op	     420 allocs/op
BenchmarkOperations/Pod/UpdateVersion-12              	    5000	    277914 ns/op	   34416 B/op	     565 allocs/op
BenchmarkOperations/Node/Create-12                    	   10000	    154485 ns/op	   26362 B/op	     283 allocs/op
BenchmarkOperations/Node/Apply-12                     	    3000	    476571 ns/op	   98132 B/op	     981 allocs/op
BenchmarkOperations/Node/Update-12                    	    5000	    292993 ns/op	   37745 B/op	     467 allocs/op
BenchmarkOperations/Node/UpdateVersion-12             	    3000	    447654 ns/op	   48123 B/op	     631 allocs/op
BenchmarkOperations/Endpoints/Create-12               	  200000	     11834 ns/op	    2860 B/op	      45 allocs/op
BenchmarkOperations/Endpoints/Apply-12                	    2000	    910033 ns/op	   46889 B/op	    1076 allocs/op
BenchmarkOperations/Endpoints/Update-12               	     200	   7172467 ns/op	    4484 B/op	      77 allocs/op
BenchmarkOperations/Endpoints/UpdateVersion-12        	     100	  14381702 ns/op	    5104 B/op	      89 allocs/op
BenchmarkOperations/CustomResourceDefinition/Create-12         	    1000	   1288391 ns/op	  118017 B/op	    1624 allocs/op
BenchmarkOperations/CustomResourceDefinition/Apply-12          	     500	   3417275 ns/op	  409462 B/op	    4961 allocs/op
BenchmarkOperations/CustomResourceDefinition/Update-12         	     100	  10698995 ns/op	  139111 B/op	    1960 allocs/op
BenchmarkOperations/CustomResourceDefinition/UpdateVersion-12  	     100	  18946980 ns/op	  159134 B/op	    2276 allocs/op

We currently were mostly benchmarking creation, apply but not updates,
nor any updates across versions. These new tests show that updates are
extremely expensive for objects that have big "atomic" values because
the comparison is pretty slow.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 5, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 5, 2019
@apelisse
Copy link
Contributor Author

apelisse commented Nov 5, 2019

cc @jennybuckley @lavalamp

@lavalamp
Copy link
Contributor

lavalamp commented Nov 5, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit 1ad9a28 into kubernetes-sigs:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants