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 initial benchmark tests for NIC #6422

Merged
merged 10 commits into from
Sep 18, 2024
Merged

Add initial benchmark tests for NIC #6422

merged 10 commits into from
Sep 18, 2024

Conversation

jjngx
Copy link
Contributor

@jjngx jjngx commented Sep 13, 2024

Proposed changes

This PR adds benchmark tests for NIC - annotations.

➜  kubernetes-ingress git:(test/bench) ✗ 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
BenchmarkParseRewrites-10                                    	 4749325	       251.5 ns/op	      96 B/op	       3 allocs/op
BenchmarkParseRewritesWithLeadingAndTrailingWhitespace-10    	 4718683	       256.7 ns/op	      96 B/op	       3 allocs/op
BenchmarkParseStickyService-10                               	  985568	      1168 ns/op	      64 B/op	       2 allocs/op
BenchmarkFilterMasterAnnotations-10                          	16147633	        74.11 ns/op	       0 B/op	       0 allocs/op
BenchmarkFilterMinionAnnotations-10                          	22283346	        52.99 ns/op	       0 B/op	       0 allocs/op
BenchmarkMergeMasterAnnotationsIntoMinion-10                 	 9383858	       128.1 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/nginxinc/kubernetes-ingress/internal/configs	8.390s

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:04
@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 (8f486f6).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6422      +/-   ##
==========================================
+ 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 136f212 into main Sep 18, 2024
82 of 83 checks passed
@jjngx jjngx deleted the test/bench branch September 18, 2024 10:00
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