如何更改locate中用户绑定的客户端端口

发布于 2025-01-20 14:33:10 字数 607 浏览 5 评论 0原文

场景

我正在测试UDP服务器的性能。它是用locust + 自定义客户端实现的。

当自定义客户端判断数据包丢失时,它记录了已发送的数据并将异常归为locust

locust捕获异常时,它将停止执行任务集后面的任务,跳过当前任务集,然后选择一个新任务集以执行。

如果只有一个任务集,则将当前任务集重新执行。

问题

我想替换用户绑定的套接字端口时,locust re执行任务集。

但是,在插座绑定到端口之后,无法更改端口(我找不到可以更改的示例。)

我尝试在用户约束的任务集中绑定自定义客户端,但是我收到了一个locust的错误。

有什么方法可以意识到我的需求吗?

还有其他观点吗?

例如:

  • locust捕获异常,结束当前用户,然后启动新用户。

最后的

英语不是我的母语,请原谅我的语法错误。

感谢您的阅读!如果您可以提供帮助,那就更好了。

scene

I am testing the performance of UDP server. It is implemented with Locust + custom client.

When the custom client judges the packet loss, it records the sent data and throws an exception to Locust.

When Locust catches the exception, it will stop executing the tasks behind the task set, skip the current task set and select a new task set for execution.

If there is only one task set, the current task set is re executed.

problem

I want to replace the socket port bound by user when Locust re executes the task set.

However, the port cannot be changed after the socket is bound to the port (I can't find an example on Google that can be changed.)

I tried to bind a custom client in the task set bound by user, but I received an error from Locust.

Is there any way to realize my demand?

Are there any other perspectives?

For example:

  • After Locust catches an exception, end the current user, and then start a new user.

last

English is not my native language, please forgive my grammar mistakes.

Thanks for reading! It would be better if you could help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文