2018-03-16 21:06:46 +00:00
|
|
|
|
2018-04-06 19:48:58 +00:00
|
|
|
This directory contains an addon for benchmarking and profiling mitmproxy. At
|
|
|
|
the moment, this is simply to give developers a quick way to see the impact of
|
|
|
|
their work. Eventually, this might grow into a performance dashboard with
|
2018-03-16 21:06:46 +00:00
|
|
|
historical data, so we can track performance over time.
|
|
|
|
|
|
|
|
# Setup
|
|
|
|
|
|
|
|
Install the following tools:
|
|
|
|
|
2018-04-06 19:48:58 +00:00
|
|
|
https://github.com/wg/wrk
|
|
|
|
|
2018-03-16 21:06:46 +00:00
|
|
|
go get github.com/cortesi/devd/cmd/devd
|
|
|
|
|
|
|
|
You may also want to install snakeviz to make viewing profiles easier:
|
|
|
|
|
|
|
|
pip install snakeviz
|
|
|
|
|
2018-04-06 19:48:58 +00:00
|
|
|
Now run the benchmark by loading the addon. A typical invocation is as follows:
|
2018-03-16 21:06:46 +00:00
|
|
|
|
2018-04-06 19:48:58 +00:00
|
|
|
mitmdump -p0 -q --set benchmark_save_path=/tmp/foo -s ./benchmark.py
|
2018-03-16 21:06:46 +00:00
|
|
|
|
2018-04-06 19:48:58 +00:00
|
|
|
This will start up the backend server, run the benchmark, save the results to
|
|
|
|
/tmp/foo.bench and /tmp/foo.prof, and exit.
|