Commit Graph

2 Commits

Author SHA1 Message Date
Joakim Roubert e23d7a99c0
Fix shellcheck issues in shell scripts (#554)
Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
2020-06-15 08:07:20 -07:00
Eliza Weisman a5e168e930
profiling: add benchmark and profiling scripts (#406)
* profiling: Benchmark and profiling scripts

A benchmark/profiling script for local development
or a CI helps to catch performance regressions early
and find spots for optimization.

The benchmark setup consists of a cargo test
that reuses the test infrastructure to forward
localhost connections. This test is skipped by
default unless an env var is set.
The benchmark load comes from a fortio server
and client for HTTP/gRPC req/s latency measurement
and from an iperf server and client for TCP throughput
measurement.
In addition to the fortio UI to inspect the benchmark
data, the results are also stored to a summary text file
which can be used to plot the difference of the summary
results of, e.g., two git branches.

The profiling setup is the same as above but also
runs "perf" or "memory-profilier" to sample the
call stacks at either runtime or on heap allocation
calls. This requires a special debug build with
optimizations, that can be generated with a build script.
The results can be inspected as interactive flamegraph
SVGs in the browser.

Please follow the instructions in the profiling/README.md
file on how the scripts are used.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2020-02-19 11:34:29 -08:00