Skip to content

Commit d6f8f7a

Browse files
authored
Update buf plugins, cockroach with massive performance gain, other deps (#95)
1 parent 1d56df4 commit d6f8f7a

File tree

9 files changed

+161
-101
lines changed

9 files changed

+161
-101
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ docker run -it --rm --entrypoint /cli ghcr.io/metal-stack/go-ipam
133133
| MongoDB | 415/sec | 682/sec | 772/sec | | Y | Y |
134134
| Etcd | 258/sec | 368/sec | 533/sec | | Y | N |
135135
| Postgres | 203/sec | 331/sec | 472/sec | | Y | N |
136-
| CockroachDB | 40/sec | 37/sec | 46/sec | | Y | Y |
136+
| CockroachDB | 170/sec | 300/sec | 470/sec | | Y | Y |
137137

138138
The benchmarks above were performed using:
139139

140140
* cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
141141
* postgres:15-alpine
142-
* cockroach:v22.1.0
142+
* cockroach:v22.2.0
143143
* redis:7.0-alpine
144144
* keydb:alpine_x86_64_v6.3.1
145145
* etcd:v3.5.5

api/v1/ipam.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,11 @@ func main() {
250250
}
251251

252252
func client(ctx *cli.Context) apiv1connect.IpamServiceClient {
253-
clientOpts, _ := compress.All(compress.LevelBalanced)
254253

255254
return apiv1connect.NewIpamServiceClient(
256255
http.DefaultClient,
257256
ctx.String("grpc-server-endpoint"),
258257
connect.WithGRPC(),
259-
clientOpts,
258+
compress.WithAll(compress.LevelBalanced),
260259
)
261260
}

cmd/server/server.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ func (s *server) Run() error {
4646
// handler.
4747
mux.Handle(apiv1connect.NewIpamServiceHandler(service.New(s.log, s.ipamer)))
4848

49-
_, serverOpts := compress.All(compress.LevelBalanced)
5049
mux.Handle(grpchealth.NewHandler(
5150
grpchealth.NewStaticChecker(apiv1connect.IpamServiceName),
52-
serverOpts,
51+
compress.WithAll(compress.LevelBalanced),
5352
))
5453
mux.Handle(grpcreflect.NewHandlerV1(
5554
grpcreflect.NewStaticReflector(apiv1connect.IpamServiceName),
56-
serverOpts,
55+
compress.WithAll(compress.LevelBalanced),
5756
))
5857

5958
server := http.Server{

go.mod

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,55 @@ module github.com/metal-stack/go-ipam
33
go 1.18
44

55
require (
6-
github.com/avast/retry-go/v4 v4.3.1
7-
github.com/bufbuild/connect-go v1.1.0
6+
github.com/avast/retry-go/v4 v4.3.2
7+
github.com/bufbuild/connect-go v1.4.1
88
github.com/bufbuild/connect-grpchealth-go v1.0.0
99
github.com/bufbuild/connect-grpcreflect-go v1.0.0
1010
github.com/go-redis/redis/v8 v8.11.5
1111
github.com/jmoiron/sqlx v1.3.5
12-
github.com/klauspost/connect-compress v0.1.1
12+
github.com/klauspost/connect-compress v1.0.0
1313
github.com/lib/pq v1.10.7
1414
github.com/metal-stack/v v1.0.3
1515
github.com/stretchr/testify v1.8.1
1616
github.com/testcontainers/testcontainers-go v0.15.0
17-
github.com/urfave/cli/v2 v2.23.5
18-
go.etcd.io/etcd/client/v3 v3.5.5
19-
go.mongodb.org/mongo-driver v1.11.0
20-
go.uber.org/zap v1.23.0
17+
github.com/urfave/cli/v2 v2.23.7
18+
go.etcd.io/etcd/client/v3 v3.5.6
19+
go.mongodb.org/mongo-driver v1.11.1
20+
go.uber.org/zap v1.24.0
2121
go4.org/netipx v0.0.0-20220925034521-797b0c90d8ab
22-
golang.org/x/net v0.2.0
22+
golang.org/x/net v0.5.0
2323
golang.org/x/sync v0.1.0
2424
google.golang.org/protobuf v1.28.1
2525
)
2626

2727
require (
2828
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
2929
github.com/Microsoft/go-winio v0.6.0 // indirect
30-
github.com/Microsoft/hcsshim v0.9.5 // indirect
30+
github.com/Microsoft/hcsshim v0.9.6 // indirect
3131
github.com/benbjohnson/clock v1.3.0 // indirect
3232
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
33-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
33+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
3434
github.com/containerd/cgroups v1.0.4 // indirect
35-
github.com/containerd/containerd v1.6.10 // indirect
35+
github.com/containerd/containerd v1.6.15 // indirect
3636
github.com/coreos/go-semver v0.3.0 // indirect
3737
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
3838
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
3939
github.com/davecgh/go-spew v1.1.1 // indirect
4040
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
4141
github.com/docker/distribution v2.8.1+incompatible // indirect
42-
github.com/docker/docker v20.10.21+incompatible // indirect
42+
github.com/docker/docker v20.10.22+incompatible // indirect
4343
github.com/docker/go-connections v0.4.0 // indirect
4444
github.com/docker/go-units v0.5.0 // indirect
4545
github.com/gogo/protobuf v1.3.2 // indirect
4646
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4747
github.com/golang/protobuf v1.5.2 // indirect
4848
github.com/golang/snappy v0.0.4 // indirect
4949
github.com/google/uuid v1.3.0 // indirect
50-
github.com/klauspost/compress v1.15.12 // indirect
51-
github.com/magiconair/properties v1.8.6 // indirect
50+
github.com/klauspost/compress v1.15.14 // indirect
51+
github.com/magiconair/properties v1.8.7 // indirect
5252
github.com/moby/sys/mount v0.3.3 // indirect
5353
github.com/moby/sys/mountinfo v0.6.2 // indirect
54-
github.com/moby/term v0.0.0-20221105221325-4eb28fa6025c // indirect
54+
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
5555
github.com/montanaflynn/stats v0.6.6 // indirect
5656
github.com/morikuni/aec v1.0.0 // indirect
5757
github.com/opencontainers/go-digest v1.0.0 // indirect
@@ -62,21 +62,21 @@ require (
6262
github.com/russross/blackfriday/v2 v2.1.0 // indirect
6363
github.com/sirupsen/logrus v1.9.0 // indirect
6464
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
65-
github.com/xdg-go/scram v1.1.1 // indirect
66-
github.com/xdg-go/stringprep v1.0.3 // indirect
65+
github.com/xdg-go/scram v1.1.2 // indirect
66+
github.com/xdg-go/stringprep v1.0.4 // indirect
6767
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
6868
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
69-
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
70-
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
69+
go.etcd.io/etcd/api/v3 v3.5.6 // indirect
70+
go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
7171
go.opencensus.io v0.24.0 // indirect
7272
go.uber.org/atomic v1.10.0 // indirect
73-
go.uber.org/multierr v1.8.0 // indirect
74-
golang.org/x/crypto v0.3.0 // indirect
73+
go.uber.org/multierr v1.9.0 // indirect
74+
golang.org/x/crypto v0.5.0 // indirect
7575
golang.org/x/mod v0.7.0 // indirect
76-
golang.org/x/sys v0.2.0 // indirect
77-
golang.org/x/text v0.4.0 // indirect
78-
golang.org/x/tools v0.3.0 // indirect
79-
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
76+
golang.org/x/sys v0.4.0 // indirect
77+
golang.org/x/text v0.6.0 // indirect
78+
golang.org/x/tools v0.5.0 // indirect
79+
google.golang.org/genproto v0.0.0-20230106154932-a12b697841d9 // indirect
8080
google.golang.org/grpc v1.51.0 // indirect
8181
gopkg.in/yaml.v3 v3.0.1 // indirect
8282
)

0 commit comments

Comments
 (0)