Selenium:PhantomJS比Firefox慢

时间:2015-07-30 12:19:49

标签: selenium phantomjs urllib2

我写了Selenium测试,点击我的ExtJS-Twisted网络应用程序并且工作非常慢。

有人可以解释为什么PhantomJS在我的配置上比Firefox运行慢得多吗? urllib2的方法 recv 有什么问题?

Profiler统计信息:

  • 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

试验机:

0 个答案:

没有答案