Skip to content

Commit

Permalink
add benchmark test for ipam (#2123)
Browse files Browse the repository at this point in the history
* add benchmark test for ipam

* refactor

* refactor all

* refactor

* refactor generate random ips

* refactor ipset, no use the thirdparty pkg, because have some performence
issue

* refactor name

* function pop need lock, because it write and read action. when has
multiple thread the iterator in map can't be write and read at same time

* 1. add time trace for 100000 pod add/del

2. reduce pods num because test time is too long
  • Loading branch information
changluyi committed Dec 12, 2022
1 parent 4b1e78c commit a4a8b5a
Show file tree
Hide file tree
Showing 2 changed files with 429 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ scan:
ut:
ginkgo -mod=mod -progress --always-emit-ginkgo-writer --slow-spec-threshold=60s test/unittest

.PHONY: ipam-bench
ipam-bench:
go test -timeout 30m -bench='^BenchmarkIPAM' -benchtime=10000x test/unittest/ipam_bench/ipam_test.go -args -logtostderr=false
go test -timeout 90m -bench='^BenchmarkParallelIPAM' -benchtime=10x test/unittest/ipam_bench/ipam_test.go -args -logtostderr=false

.PHONY: e2e
e2e:
$(call docker_create_vlan_network)
Expand Down

0 comments on commit a4a8b5a

Please sign in to comment.