Skip to content

Commit 337cf6b

Browse files
committed
successful profiling of internal resources
Signed-off-by: Alec Holmes <[email protected]>
1 parent 4492162 commit 337cf6b

28 files changed

+9392
-37
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ examples/dyplomat/dyplomat
1616
*_gen_test.go
1717

1818
/envoy*.log
19+
20+
# Benchmarking artifacts
21+
*.gz
22+
*.pprof

Makefile

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,30 @@ $(BINDIR)/test:
5353
integration: integration.xds integration.ads integration.rest integration.xds.mux integration.xds.delta integration.ads.delta
5454

5555
integration.ads: $(BINDIR)/test $(BINDIR)/upstream
56-
env XDS=ads build/integration.sh
56+
env XDS=ads MODE=0 build/integration.sh
5757

5858
integration.xds: $(BINDIR)/test $(BINDIR)/upstream
59-
env XDS=xds build/integration.sh
59+
env XDS=xds MODE=0 build/integration.sh
6060

6161
integration.rest: $(BINDIR)/test $(BINDIR)/upstream
62-
env XDS=rest build/integration.sh
62+
env XDS=rest MODE=0 build/integration.sh
6363

6464
integration.xds.mux: $(BINDIR)/test $(BINDIR)/upstream
65-
env XDS=xds build/integration.sh -mux
65+
env XDS=xds MODE=0 build/integration.sh -mux
6666

6767
integration.xds.delta: $(BINDIR)/test $(BINDIR)/upstream
68-
env XDS=delta build/integration.sh
68+
env XDS=delta MODE=0 build/integration.sh
6969

7070
integration.ads.delta: $(BINDIR)/test $(BINDIR)/upstream
71-
env XDS=delta-ads build/integration.sh
71+
env XDS=delta-ads MODE=0 build/integration.sh
72+
73+
74+
#------------------------------------------------------------------------------
75+
# Benchmarks utilizing intergration tests
76+
#------------------------------------------------------------------------------
77+
.PHONY: benchmark
78+
benchmark: $(BINDIR)/test $(BINDIR)/upstream
79+
env XDS=xds MODE=$(MODE) build/integration.sh
7280

7381
#--------------------------------------
7482
#-- example xDS control plane server
@@ -85,3 +93,7 @@ example: $(BINDIR)/example
8593
docker_tests:
8694
docker build --pull -f Dockerfile.ci . -t gcp_ci && \
8795
docker run -v $$(pwd):/go-control-plane $$(tty -s && echo "-it" || echo) gcp_ci /bin/bash -c /go-control-plane/build/do_ci.sh
96+
97+
docker_benchmarks:
98+
docker build --pull -f Dockerfile.ci . -t gcp_ci && \
99+
docker run -v $$(pwd):/go-control-plane $$(tty -s && echo "-it" || echo) gcp_ci /bin/bash -c /go-control-plane/build/do_benchmarks.sh

benchmarks/pngs/block_graph.png

338 KB
Loading

benchmarks/pngs/cpu_graph.png

601 KB
Loading
483 KB
Loading

benchmarks/pngs/mem_graph.png

594 KB
Loading

benchmarks/pngs/mutex_graph.png

354 KB
Loading

benchmarks/reports/block_text.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
File: test
2+
Type: delay
3+
Time: Jul 29, 2021 at 6:41pm (UTC)
4+
Showing nodes accounting for 235.20s, 99.76% of 235.76s total
5+
Dropped 62 nodes (cum <= 1.18s)
6+
flat flat% sum% cum cum%
7+
235.20s 99.76% 99.76% 235.20s 99.76% runtime.selectgo
8+
0 0% 99.76% 5.56s 2.36% github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3.(*clusterDiscoveryServiceStreamClustersServer).Recv
9+
0 0% 99.76% 5.55s 2.36% github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3._ClusterDiscoveryService_StreamClusters_Handler
10+
0 0% 99.76% 22.34s 9.47% github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3.(*endpointDiscoveryServiceStreamEndpointsServer).Recv
11+
0 0% 99.76% 22.34s 9.48% github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3._EndpointDiscoveryService_StreamEndpoints_Handler
12+
0 0% 99.76% 5.48s 2.32% github.com/envoyproxy/go-control-plane/envoy/service/listener/v3.(*listenerDiscoveryServiceStreamListenersServer).Recv
13+
0 0% 99.76% 5.47s 2.32% github.com/envoyproxy/go-control-plane/envoy/service/listener/v3._ListenerDiscoveryService_StreamListeners_Handler
14+
0 0% 99.76% 15.29s 6.49% github.com/envoyproxy/go-control-plane/envoy/service/route/v3.(*routeDiscoveryServiceStreamRoutesServer).Recv
15+
0 0% 99.76% 15.29s 6.49% github.com/envoyproxy/go-control-plane/envoy/service/route/v3._RouteDiscoveryService_StreamRoutes_Handler
16+
0 0% 99.76% 5.59s 2.37% github.com/envoyproxy/go-control-plane/envoy/service/runtime/v3.(*runtimeDiscoveryServiceStreamRuntimeServer).Recv
17+
0 0% 99.76% 5.59s 2.37% github.com/envoyproxy/go-control-plane/envoy/service/runtime/v3._RuntimeDiscoveryService_StreamRuntime_Handler
18+
0 0% 99.76% 54.26s 23.02% github.com/envoyproxy/go-control-plane/pkg/server/sotw/v3.(*server).StreamHandler
19+
0 0% 99.76% 54.26s 23.02% github.com/envoyproxy/go-control-plane/pkg/server/sotw/v3.(*server).StreamHandler.func1
20+
0 0% 99.76% 54.26s 23.02% github.com/envoyproxy/go-control-plane/pkg/server/sotw/v3.(*server).process
21+
0 0% 99.76% 5.55s 2.36% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamClusters
22+
0 0% 99.76% 22.34s 9.48% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamEndpoints
23+
0 0% 99.76% 54.26s 23.02% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamHandler (inline)
24+
0 0% 99.76% 5.47s 2.32% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamListeners
25+
0 0% 99.76% 15.29s 6.49% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamRoutes
26+
0 0% 99.76% 5.59s 2.37% github.com/envoyproxy/go-control-plane/pkg/server/v3.(*server).StreamRuntime
27+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.(*Server).handleStream
28+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.(*Server).processStreamingRPC
29+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.(*Server).serveStreams.func1.2
30+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.(*parser).recvMsg
31+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.(*serverStream).RecvMsg
32+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.recv
33+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc.recvAndDecompress
34+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc/internal/transport.(*Stream).Read
35+
0 0% 99.76% 29.61s 12.56% google.golang.org/grpc/internal/transport.(*controlBuffer).get
36+
0 0% 99.76% 29.61s 12.56% google.golang.org/grpc/internal/transport.(*loopyWriter).run
37+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc/internal/transport.(*recvBufferReader).Read
38+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc/internal/transport.(*recvBufferReader).read
39+
0 0% 99.76% 54.26s 23.02% google.golang.org/grpc/internal/transport.(*transportReader).Read
40+
0 0% 99.76% 29.61s 12.56% google.golang.org/grpc/internal/transport.newHTTP2Server.func2
41+
0 0% 99.76% 54.26s 23.02% io.ReadAtLeast
42+
0 0% 99.76% 54.26s 23.02% io.ReadFull (inline)
43+
0 0% 99.76% 1.79s 0.76% main.callEcho.func1
44+
0 0% 99.76% 8.14s 3.45% main.main
45+
0 0% 99.76% 1.78s 0.76% net/http.(*Client).Do (inline)
46+
0 0% 99.76% 1.78s 0.76% net/http.(*Client).Get
47+
0 0% 99.76% 1.78s 0.76% net/http.(*Client).do
48+
0 0% 99.76% 1.78s 0.76% net/http.(*Client).send
49+
0 0% 99.76% 1.78s 0.76% net/http.(*Transport).RoundTrip
50+
0 0% 99.76% 1.78s 0.76% net/http.(*Transport).roundTrip
51+
0 0% 99.76% 1.65s 0.7% net/http.(*persistConn).roundTrip
52+
0 0% 99.76% 87.70s 37.20% net/http.(*persistConn).writeLoop
53+
0 0% 99.76% 1.78s 0.76% net/http.send
54+
0 0% 99.76% 8.14s 3.45% runtime.main

0 commit comments

Comments
 (0)