Skip to content

Instantly share code, notes, and snippets.

@benasse
Created April 27, 2018 09:19
Show Gist options
  • Save benasse/48b0a1665a8346242df596a5eda8b678 to your computer and use it in GitHub Desktop.
Save benasse/48b0a1665a8346242df596a5eda8b678 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import sys, socket, time
host = "outscale.com"
service = "http"
family = socket.AF_UNSPEC
socktype = socket.SOCK_STREAM
protocol = socket.SOL_TCP
flags = 0
while True:
debut = time.time()
result = socket.getaddrinfo(host, service, family, socktype, protocol, flags)
fin = time.time()
print(fin - debut)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment