mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 11:19:23 +00:00
a12c3d3f8e
add empty test files to satisfy linter
24 lines
540 B
Python
24 lines
540 B
Python
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))
|