diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-04-17 07:35:12 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 07:35:12 +1200 |
commit | 754cb6cac9b1db56e2221fa379db014856a4725d (patch) | |
tree | 3eae65bfb213e549531fa21dfb4edb4e8ce58410 /test/helper_tools/bench.py | |
parent | 5f74adc2df6d2a9452a9e3a6923fe05ba579e9e6 (diff) | |
parent | 565146311a5f7939f107af12a91d94f5f96d56fc (diff) | |
download | mitmproxy-754cb6cac9b1db56e2221fa379db014856a4725d.tar.gz mitmproxy-754cb6cac9b1db56e2221fa379db014856a4725d.tar.bz2 mitmproxy-754cb6cac9b1db56e2221fa379db014856a4725d.zip |
Merge pull request #3048 from cortesi/qbench
Improve benchmarking
Diffstat (limited to 'test/helper_tools/bench.py')
-rw-r--r-- | test/helper_tools/bench.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/helper_tools/bench.py b/test/helper_tools/bench.py deleted file mode 100644 index fb75ef46..00000000 --- a/test/helper_tools/bench.py +++ /dev/null @@ -1,23 +0,0 @@ -import requests -import time - -n = 100 -url = "http://192.168.1.1/" -proxy = "http://192.168.1.115:8080/" - -start = time.time() -for _ in range(n): - requests.get(url, allow_redirects=False, proxies=dict(http=proxy)) - print(".", end="") -t_mitmproxy = time.time() - start - -print("\r\nTotal time with mitmproxy: {}".format(t_mitmproxy)) - - -start = time.time() -for _ in range(n): - requests.get(url, allow_redirects=False) - print(".", end="") -t_without = time.time() - start - -print("\r\nTotal time without mitmproxy: {}".format(t_without)) |