• 1.QPS 指每秒查询数,通常用来记 DB 的性能的。 还是第 1 次看到 QPS=RPS 的说法。我猜,jmeter QPS 这个指标应该还是指 db sql 代码的性能测试吧。jmeter 不熟,只能猜了。

    2.主流性能测试工具都是需要等回应的,如果事务返回正确,只有 1 个接口,一般 RPS=TPS,经常用 LR 的一般会看到这结果。

    3.RPS!=TPS,猜测一般是客户端发送没有出去,或者看看你单机处理的客户端流量,客户端也是需要做下监控的。

    4.从结果来看,如果压测机的流量正常,服务端的处理能力已经达到最大了。如果资源很少,你查一下一些参数设置,有可能是他们的影响。

    5.第 4 点排除后,如果你想让他报错,就继续加 vuser 吧,500 一个请求也才 4s,默认超时是 60s。有时虽然没有报错,但不一定代码时间上可以接受。

    6.如果你想,压力机 vuser N 多,不等回应,然后分开计算 RPS 和 TPS。 你可以尝试用 python Gevent + scrapy,可以实现发和回的异步事件操作。

  • 补充,在网页端的方法:
    1.命令行启动:F:>java -jar selenium-server-standalone-2.42.2.jar

    1. 修改以下方法:
    def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=None, browser_profile=None, proxy=None, keep_alive=False, file_detector=None,reconnect = False):
    
            if reconnect:
                sessionResponse = self.execute(Command.GET_ALL_SESSIONS)
                print sessionResponse
                if sessionResponse.has_key('sessionId') and sessionResponse['sessionId']!=None:
                    self.session_id = sessionResponse['sessionId']
                    self.capabilities =sessionResponse['value']
                else:
                    if len(sessionResponse['value']) > 0:
                        print sessionResponse['value'][0]['id']
                        self.session_id=sessionResponse['value'][0]['id']
                        self.capabilities = sessionResponse['value']
            else:
                self.start_session(desired_capabilities, browser_profile)
    

    3. 执行端代码

    PROXY = "localhost:4444"
       # Create a copy of desired capabilities object.
       desired_capabilities = driver.DesiredCapabilities.INTERNETEXPLORER.copy()
       # Change the proxy properties of that copy.
       desired_capabilities['proxy'] = {
           "httpProxy": PROXY,
           "ftpProxy": PROXY,
           "sslProxy": PROXY,
           "noProxy": None,
           "proxyType": "MANUAL",
           "class": "org.openqa.selenium.Proxy",
           "autodetect": False
       }
    
       # you have to use remote, otherwise you'll have to code it yourself in python to
       # dynamically changing the system proxy preferences
       start_driver = driver.Remote("http://localhost:4444/wd/hub", desired_capabilities,reconnect=True)
    
  • python 脚本报错,求指点 at 2017年07月12日

    exit(0)

  • 其实,appium 官主有个工具的。https://github.com/mykola-mokhnach/Appium-iOS-Inspector
    使用方法:
    1.启动脚本 Remote 后设置个断点。
    2.下载这个网页,点击后即可显示出结构来

  • 用这个很久了,大概 4G 内存可以模拟近 10w 个连接的请求吧。