@@ -0,0 +1,1027 @@
+%22%22%22%0AUsage: %0A%09- pip install pytest-benchmark%0A%09- pytest bench.py%0A%0ASee also:%0A%09- https://github.com/mitmproxy/proxybench%0A%22%22%22%0Aimport copy%0A%0Afrom .layers.http import test_http, test_http2%0Afrom .layers import test_tcp, test_tls%0A%0A%0Adef test_bench_http_roundtrip(tctx, benchmark):%0A    # benchmark something%0A    benchmark(test_http.test_http_proxy, tctx)%0A%0A%0Adef test_bench_http2_roundtrip(tctx, benchmark):%0A    # benchmark something%0A    benchmark(test_http2.test_simple, tctx)%0A%0A%0Adef test_bench_tcp_roundtrip(tctx, benchmark):%0A    # benchmark something%0A    benchmark(lambda: test_tcp.test_simple(copy.deepcopy(tctx)))%0A%0A%0Adef test_bench_server_tls(tctx, benchmark):%0A    t = test_tls.TestServerTLS().test_simple%0A    benchmark(lambda: t(copy.deepcopy(tctx)))%0A%0A%0Adef test_bench_client_tls(tctx, benchmark):%0A    t = test_tls.TestClientTLS().test_client_only%0A    benchmark(lambda: t(copy.deepcopy(tctx)))%0A%0A%0Adef test_bench_tls_both(tctx, benchmark):%0A    t = test_tls.TestClientTLS().test_server_required%0A    benchmark(lambda: t(copy.deepcopy(tctx)))%0A

add minimal benchmarks