【发布时间】:2021-01-13 21:26:54
【问题描述】:
我是 Locust 的新手,我正在尝试使用准系统 https GET 来运行请求服务器索引页。
locustfile.py
import time
from locust import HttpUser, task
class QuickstartUser(HttpUser):
@task
def index(self):
self.client.get("/")
我的.conf
locustfile = locustfile.py
headless = true
expect-workers = 5
host = https://localhost:8001/
users = 100
spawn-rate = 10
run-time = 10m
csv = out
要开始这个过程,我使用:locust --conf my.conf
我希望它可以工作,但它似乎存在身份验证问题。丢失率100%
输出:
Name # reqs # fails | Avg Min Max Median | req/s failures/s
--------------------------------------------------------------------------------------------------------------------------------------------
GET // 806 806(100.00%) | 318 15 729 290 | 94.26 94.26
--------------------------------------------------------------------------------------------------------------------------------------------
Aggregated 806 806(100.00%) | 318 15 729 290 | 94.26 94.26
Response time percentiles (approximated)
Type Name 50% 66% 75% 80% 90% 95% 98% 99% 99.9% 99.99% 100% # reqs
--------|------------------------------------------------------------|---------|------|------|------|------|------|------|------|------|------|------|------|
GET // 290 390 450 510 570 630 680 710 730 730 730 806
--------|------------------------------------------------------------|---------|------|------|------|------|------|------|------|------|------|------|------|
None Aggregated 290 390 450 510 570 630 680 710 730 730 730 806
Error report
# occurrences Error
--------------------------------------------------------------------------------------------------------------------------------------------
806 GET //: SSLError(MaxRetryError("HTTPSConnectionPool(host='localhost', port=8001): Max retries exceeded with url: // (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)')))"))
--------------------------------------------------------------------------------------------------------------------------------------------
【问题讨论】:
-
我发布了一个关于 https 的答案。不过,这不应该使 Locust 不起作用。而且你没有提供很多关于你实际尝试做的事情和你看到的事情的信息。如果您直接运行,您的 locustfile.py 是否有效?你在运行分布式吗?如果是这样,你是如何管理工人的?
标签: python http openssl load-testing locust