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

Add benchmark tests for configurator #6423

Merged
merged 10 commits into from
Sep 18, 2024
Merged

Add benchmark tests for configurator #6423

merged 10 commits into from
Sep 18, 2024

Conversation

jjngx
Copy link
Contributor

@jjngx jjngx commented Sep 13, 2024

Proposed changes

This PR adds initial benchmark tests for NIC configurator.

➜  kubernetes-ingress git:(test/configurator-benchmarks) ✗ go test -benchmem -run=^$  -bench . github.com/nginxinc/kubernetes-ingress/internal/configs
goos: darwin
goarch: arm64
pkg: github.com/nginxinc/kubernetes-ingress/internal/configs
cpu: Apple M1 Pro
BenchmarkAddOrUpdateIngress-10                 	   26958	     44135 ns/op	   18716 B/op	     321 allocs/op
BenchmarkAddOrUpdateMergeableIngress-10        	   22483	     53538 ns/op	   26157 B/op	     388 allocs/op
BenchmarkUpdateEndpointsMergeableIngress-10    	   22503	     53233 ns/op	   26157 B/op	     388 allocs/op
BenchmarkAddVirtualServerMetricsLabels-10      	  700798	      1665 ns/op	    1681 B/op	      25 allocs/op
BenchmarkAddTransportServerMetricsLabels-10    	  775048	      1530 ns/op	    1697 B/op	      25 allocs/op
PASS
ok  	github.com/nginxinc/kubernetes-ingress/internal/configs	8.394s

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@jjngx jjngx requested a review from a team as a code owner September 13, 2024 15:56
@github-actions github-actions bot added the go Pull requests that update Go code label Sep 13, 2024
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.24%. Comparing base (166b954) to head (860a514).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6423      +/-   ##
==========================================
+ Coverage   53.20%   53.24%   +0.03%     
==========================================
  Files          85       85              
  Lines       16002    16015      +13     
==========================================
+ Hits         8514     8527      +13     
- Misses       7081     7082       +1     
+ Partials      407      406       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jjngx jjngx self-assigned this Sep 16, 2024
@jjngx jjngx merged commit c2f6cf1 into main Sep 18, 2024
78 checks passed
@jjngx jjngx deleted the test/configurator-benchmarks branch September 18, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

3 participants