mitmproxy/test/bench
Mickaël Schoentgen c03b07930c Fix ResourceWarning: unclosed file, prevent resource leaks
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-06 15:06:30 +01:00
..
.gitignore bench: Add some very simple manual benchmarking helpers 2018-03-17 10:06:46 +13:00
README.md Improve benchmarking 2018-04-16 09:19:14 +12:00
benchmark.py Fix ResourceWarning: unclosed file, prevent resource leaks 2019-01-06 15:06:30 +01:00
run-mitmdump benchmarks: quick-run scripts for mitmproxy and mitmdump 2018-05-08 11:08:37 +12:00
run-mitmproxy benchmarks: quick-run scripts for mitmproxy and mitmdump 2018-05-08 11:08:37 +12:00
serialization-bm.py benchmark: some improvements - limit to queue size 2018-07-23 21:18:24 +02:00

README.md

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 historical data, so we can track performance over time.

Setup

Install the following tools:

https://github.com/wg/wrk

go get github.com/cortesi/devd/cmd/devd

You may also want to install snakeviz to make viewing profiles easier:

pip install snakeviz

Now run the benchmark by loading the addon. A typical invocation is as follows:

mitmdump -p0 -q --set benchmark_save_path=/tmp/foo -s ./benchmark.py

This will start up the backend server, run the benchmark, save the results to /tmp/foo.bench and /tmp/foo.prof, and exit.