shadowsocks/tests/test_latency.py
2014-08-27 00:17:26 +08:00

12 lines
199 B
Python

#!/usr/bin/python
import sys
import time
before = time.time()
for line in sys.stdin:
if 'HTTP/1.1 ' in line:
diff = time.time() - before
print 'headline %dms' % (diff * 1000)