我正在尝试衡量网站的响应时间,但我收到错误。
脚本:
#!/usr/bin/python
import requests
time= requests.get("http://google.com").elapsed.total_seconds()
print time
错误:
Traceback (most recent call last):
File "./test.py", line 5, in <module>
time= requests.get("http://google.com").elapsed.total_seconds()
AttributeError: 'Response' object has no attribute 'elapsed'