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

Conradhanson/v0.34.x improve set mem alloc #537

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
df5c4c9
use slice to back set
conradhanson Mar 19, 2024
79903fa
improved Insert method perf
conradhanson Mar 20, 2024
e14bf9e
sets use pure slice impl
conradhanson Mar 20, 2024
31efd04
benchmark test
conradhanson Mar 20, 2024
7d9ba4d
export CreationTimestamp sortFunc and equalityFunc; update sets impl …
conradhanson Mar 20, 2024
dd934b8
update sets gotmpl
conradhanson Mar 20, 2024
fd4393a
oops; update benchmark tests
conradhanson Mar 20, 2024
c27cae9
add ResourceId sortFunc and equalityFunc
conradhanson Mar 20, 2024
e84747c
ugh
conradhanson Mar 20, 2024
8d94c4d
get things flowing (with commenting code otu)
conradhanson Mar 21, 2024
b1e9308
something relies on generic sets surprisingly
conradhanson Mar 21, 2024
9556574
fix sets impl; working unit tests; generate
conradhanson Mar 22, 2024
01ec9d1
generic set with backing slice; passing v2 sets test
conradhanson Mar 25, 2024
d4fd8ee
remove sortFunc in favor of compareFunc; Find() has to take ResourceId
conradhanson Mar 26, 2024
2e6dfb4
add cluster name checks to compare func; add unit tests to sets v2; u…
conradhanson Mar 26, 2024
3b95a7b
base comparison on key generated from name, ns, cluster; use slices.B…
conradhanson Mar 27, 2024
559d60c
avoid using KeyWithSeparator since strings are expensive
conradhanson Mar 29, 2024
ed5fcfe
ugh commit the changes
conradhanson Mar 29, 2024
e1272f8
update
saiskee Apr 2, 2024
ceb0d46
remove iter and rangefunc
saiskee Apr 2, 2024
b040fa5
replace Generic range with yield func
saiskee Apr 2, 2024
a126243
replace Generic range with yield func
saiskee Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#----------------------------------------------------------------------------------
# Build
#----------------------------------------------------------------------------------
Expand All @@ -16,12 +17,12 @@ export PATH:=$(GOBIN):$(PATH)
.PHONY: install-go-tools
install-go-tools: mod-download
mkdir -p $(DEPSGOBIN)
go install github.com/golang/protobuf/[email protected]
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
go install github.com/solo-io/[email protected]
go install github.com/golang/mock/[email protected]
go install github.com/onsi/ginkgo/v2/[email protected]
go install golang.org/x/tools/cmd/goimports
$(GO_ARGS) go install github.com/golang/protobuf/[email protected]
$(GO_ARGS) go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
$(GO_ARGS) go install github.com/solo-io/[email protected]
$(GO_ARGS) go install github.com/golang/mock/[email protected]
$(GO_ARGS) go install github.com/onsi/ginkgo/v2/[email protected]
$(GO_ARGS) go install golang.org/x/tools/cmd/goimports

# proto compiler installation
PROTOC_VERSION:=3.15.8
Expand Down Expand Up @@ -50,17 +51,17 @@ install-protoc:
.PHONY: install-tools
install-tools: install-go-tools install-protoc

# Generated Code - Required to update Codgen Templates
.PHONY: generated-code
generated-code: install-tools update-licenses
# Generate Code - Required to update Codgen Templates
.PHONY: generate-code
generate-code: install-tools update-licenses
$(DEPSGOBIN)/protoc --version
go run api/generate.go
$(GO_ARGS) go run api/generate.go
# the api/generate.go command is separated out to enable us to run go generate on the generated files (used for mockgen)
# this re-gens test protos
go test ./codegen
go generate -v ./...
$(GO_ARGS) go test ./codegen
$(GO_ARGS) go generate -v ./...
$(DEPSGOBIN)/goimports -w .
go mod tidy
$(GO_ARGS) go mod tidy

generate-changelog:
@ci/changelog.sh
Expand All @@ -73,18 +74,18 @@ generate-changelog:
# set TEST_PKG to run a specific test package
.PHONY: run-tests
run-tests:
PATH=$(DEPSGOBIN):$$PATH ginkgo -r -failFast -trace -progress \
$(GO_ARGS) PATH=$(DEPSGOBIN):$$PATH ginkgo -r -failFast -trace -progress \
-progress \
-compilers=4 \
-skipPackage=$(SKIP_PACKAGES) $(TEST_PKG) \
-failOnPending \
-randomizeAllSpecs \
-randomizeSuites \
-keepGoing
$(DEPSGOBIN)/goimports -w .
$(GO_ARGS) $(DEPSGOBIN)/goimports -w .

run-test:
PATH=$(DEPSGOBIN):$$PATH ginkgo $(GINKGO_FLAGS) $(TEST_PKG)
$(GO_ARGS) PATH=$(DEPSGOBIN):$$PATH ginkgo $(GINKGO_FLAGS) $(TEST_PKG)

#----------------------------------------------------------------------------------
# Third Party License Management
Expand Down
56 changes: 56 additions & 0 deletions codegen/test/api/things.test.io/v1/sets/mocks/sets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

136 changes: 112 additions & 24 deletions codegen/test/api/things.test.io/v1/sets/sets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading