shadowsocks/test_latency.py

14 lines
200 B
Python
Raw Normal View History

2014-05-02 02:27:57 +00:00
#!/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)