You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These benchmarks are designed to run off the integration test suite, and provide detailed profiling artifacts generated with pprof.
4
+
5
+
## Prerequisites
6
+
-[Go 1.16+](https://golang.org/dl/)
7
+
-[Graphviz](https://graphviz.org/download/)
8
+
-[pprof](https://github.com/google/pprof)
9
+
-[Docker](https://www.docker.com/)
10
+
11
+
## Running Locally
12
+
13
+
To run the benchmarks locally, we take a similar apprach to the integration tests.
14
+
15
+
### Requirements
16
+
17
+
* Envoy binary `envoy` available: set `ENVOY` environment variable to the
18
+
location of the binary, or use the default value `/usr/local/bin/envoy`
19
+
*`go-control-plane` builds successfully
20
+
* Local installation of pprof and graphviz for profiler output
21
+
22
+
### Steps
23
+
24
+
To run the benchmark:
25
+
```
26
+
make benchmark MODE=0
27
+
```
28
+
29
+
There are 5 different modes all corresponding to various profiling outputs:
30
+
```go
31
+
const (
32
+
PPROF_CPUint = iota
33
+
PPROF_HEAP
34
+
PPROF_MUTEX
35
+
PPROF_BLOCK
36
+
PPROF_GOROUTINE
37
+
)
38
+
```
39
+
To specifiy the mode, use `MODE` environment variable that corresponds to the output you wish to evaluate.
40
+
41
+
## Running With Docker
42
+
43
+
To run the benchmarks, we just require the prerequisite of docker and go.
44
+
45
+
### Steps
46
+
47
+
To run the benchmarks:
48
+
49
+
```
50
+
make docker_benchmarks
51
+
```
52
+
53
+
This will generate all profile artifacts in the `./benchmarks/reports`. Graphical profile anaylsis is located in `/.benchmarks/pngs`.
54
+
55
+
For more information on how to interpret these reports/graphs, [click here](https://github.com/google/pprof/blob/master/doc/README.md#graphical-reports)
Copy file name to clipboardExpand all lines: pkg/test/main/README.md
-15Lines changed: 0 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,18 +37,3 @@ eventually converges to use the latest pushed configuration) for each run.
37
37
38
38
You can run ```bin/test -help``` to get a list of the cli flags that
39
39
the test program accepts. There are also comments in ```main.go```.
40
-
41
-
## Using the pprof profiler
42
-
43
-
One customization is to run the go language profiler [pprof](https://github.com/DataDog/go-profiler-notes/blob/main/pprof.md). See also <https://golang.org/pkg/runtime/pprof/>.
44
-
45
-
The profiler is normally off because it adds overhead to the tests. You can turn
46
-
it on with the command line option `--pprof`. There is an environment variable
47
-
`PPROF` for the `make` commands shown above. For example:
48
-
49
-
(export PPROF=true; make integration.xds)
50
-
51
-
The test will then write files of the form `block_profile_xds.pb.gz`. The files
52
-
get written to the root of the project, in the same place as the envoy logs.
53
-
54
-
You can use `go tool pprof bin/test <file name>` to analyze the profile data.
0 commit comments