Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]请问boomer目前是否为按照func顺序执行? #169

Closed
AthlonHD opened this issue Aug 11, 2022 · 2 comments
Closed

[Question]请问boomer目前是否为按照func顺序执行? #169

AthlonHD opened this issue Aug 11, 2022 · 2 comments

Comments

@AthlonHD
Copy link

一个压测链路对应由多个接口组合而成,因此需要在boomer中定义多个func,在权重相同的情况下,boomer是否会按照func的顺序进行执行请求?

@myzhan
Copy link
Owner

myzhan commented Aug 12, 2022

不会,多个 task 会根据 weight 分配 goroutine,分别独立运行。

如果要顺序执行,有以下方式

  1. 可以只写一个 task,Fn 函数里面顺序执行请求。
  2. 如果需要顺序,又要加权,可以参考 taskset。
    https://github.com/myzhan/boomer/blob/master/taskset.go#L129

@AthlonHD
Copy link
Author

好的 感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants