In import urllib2 time In def one_test urllib2 urlopen http xa4a org u

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
In [1]: import urllib2, time
In [2]: def one_test():
...: urllib2.urlopen('http://xa4a.org.ua:5984/xapy/_view/chat_logs/by_chatroom_date?group=true&key=[%22pythonua@conference.jabber.ru%22,2008,10,21]').read()
...:
In [3]: def make_test():
...: stime = time.time()
...: for i in range(10):
...: one_test()
...: print (time.time()-stime)/10
...:
In [4]: make_test()
1.98955459595