These benchmarks are designed to run off the integration test suite, and provide detailed profiling artifacts generated with pprof.
To run the benchmarks locally, we take a similar apprach to the integration tests.
- Envoy binary
envoy
available: setENVOY
environment variable to the location of the binary, or use the default value/usr/local/bin/envoy
go-control-plane
builds successfully- Local installation of pprof and graphviz for profiler output
To run the benchmark:
make benchmark MODE=0
There are 5 different modes all corresponding to various profiling outputs:
const (
PPROF_CPU int = iota
PPROF_HEAP
PPROF_MUTEX
PPROF_BLOCK
PPROF_GOROUTINE
)
To specifiy the mode, use MODE
environment variable that corresponds to the output you wish to evaluate.
The output file will be stored at the project root with .pprof extension (e.g. cpu.pprof
).
Run pprof
tool like so which will open up a shell. From there, you can run command such as web
to visualize the result:
go tool pprof cpu.pprof
(pprof) web
For more information, run help
.
To run the benchmarks, we just require the prerequisite of docker and go.
To run the benchmarks:
make docker_benchmarks
This will generate all profile artifacts in the ./benchmarks/reports
. Graphical profile anaylsis is located in /.benchmarks/pngs
.
For more information on how to interpret these reports/graphs, click here