我写了Selenium测试,点击我的ExtJS-Twisted网络应用程序并且工作非常慢。
有人可以解释为什么PhantomJS在我的配置上比Firefox运行慢得多吗? urllib2的方法 recv 有什么问题?
PhantomJS
Ran 1 test in 137.150s
ncalls tottime percall cumtime percall filename:lineno(function)
4485 124.000 0.028 124.000 0.028 {method 'recv' of '_socket.socket' objects}
火狐
Ran 1 test in 36.660s
ncalls tottime percall cumtime percall filename:lineno(function)
96910 23.061 0.000 23.061 0.000 {method 'recv' of '_socket.socket' objects}
[tester@server ~]$ tracepath 192.168.200.65
1: 192.168.200.77 (192.168.200.77) 0.207ms pmtu 1500
1: 192.168.200.65 (192.168.200.65) 0.773ms reached
1: 192.168.200.65 (192.168.200.65) 0.351ms reached
Resume: pmtu 1500 hops 1 back 64
[tester@server ~]$ tracepath 192.168.200.83
1: 192.168.200.77 (192.168.200.77) 0.087ms pmtu 1500
1: 192.168.200.83 (192.168.200.83) 0.733ms reached
1: 192.168.200.83 (192.168.200.83) 0.654ms reached
Resume: pmtu 1500 hops 1 back 64
Docker
PhantomJS
{原因:https://stackoverflow.com/questions/30618113/selenium-webdriver-socket-error-connection-reset-by-peer-for-non-root-users)Firefox
或PhantomJS
,第77次使用。