Spaces:
Runtime error
Runtime error
File size: 355 Bytes
4021684 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import time
import requests
data = b"x" * 10_000_000 # 10 MB
start = time.time()
response = requests.post("https://httpbin.org/post", data=data)
end = time.time()
duration = end - start
speed_mbps = (len(data) * 8) / (duration * 1_000_000)
print(f"Upload time: {duration:.2f} seconds")
print(f"Estimated outbound upload speed: {speed_mbps:.2f} Mbps") |