代码之家  ›  专栏  ›  技术社区  ›  Alana Storm

查看蝗虫“失败”的详细信息

  •  0
  • Alana Storm  · 技术社区  · 7 年前

    locust 第一次用别人写的测试套件。我得到的结果是这样的

    Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
    --------------------------------------------------------------------------------------------------------------------------------------------
    GET /start-trip                                                  105 4928(97.91%)   11409    4214   15577  |   12000    1.60
    --------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                            105 4928(4693.33%)   
    

    我还不完全清楚失败意味着什么。i、 这里的失败是否意味着97.91%的hocust发送的请求返回了一些无效的HTTP状态码?或者测试中的服务在某个地方没有达到某些性能标准?或者第三件事?

    (测试中的服务是使用slim框架用PHP编写的,如果需要的话,可以在PHP的内置web服务下运行)

    1 回复  |  直到 7 年前
        1
  •  3
  •   Siyu Zeeshan Akhter    7 年前

    蝗虫版本0.9.0

    如果您使用的是web界面,则可以查看“失败”选项卡下的详细信息, failures

    Error report
     # occurrences      Error
    --------------------------------------------------------------------------------------------------------------------------------------------
     75                 POST /api/users: 'ConnectionError(MaxRetryError("HTTPConnectionPool(host=\'localhost\', port=3000): Max retries exceeded with url: /api/users (Caused by NewConnectionError(\'<urllib3.connection.HTTPConnection object at 0x10cfc3588>: Failed to establish a new connection: [Errno 61] Connection refused\'))"))'
    --------------------------------------------------------------------------------------------------------------------------------------------