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

No timescale support #22

Open
toponim opened this issue Sep 23, 2024 · 2 comments
Open

No timescale support #22

toponim opened this issue Sep 23, 2024 · 2 comments

Comments

@toponim
Copy link

toponim commented Sep 23, 2024

I'm using following packages:
locust==2.31.6
locust-plugins==4.5.3
locust-swarm==6.1.1

When starting swarm like this swarm -f <script_path> --loadgen-list <loadgen> --processes <process_count> --timescale ... I've noticed that worker nodes doesn't report data to timescale DB.

As far as I understand this happens because timescale plugin enabled in this handler https://github.com/SvenskaSpel/locust-plugins/blob/4.5.3/locust_plugins/__init__.py#L164, called when init event fired (from here https://github.com/locustio/locust/blob/2.31.6/locust/main.py#L525) and at this point --timescale parameter is not passed yet to worker node. Actual configuration copied from master to worker node at receiving spawn event happening here (https://github.com/locustio/locust/blob/2.31.6/locust/main.py#L616-L627).

Unfortunately plugins are not re-initialized after worker's configuration has updated so timescale plugin is not enabled.

I've seen two possible solutions here:

  • Ugly workaround I've made timescale.patch.
  • Re-initialize plugins after configuration is synced between master<>node. Unfortunately doing this requires much more locust's architecture knowledge that I posses.
@cyberw
Copy link
Collaborator

cyberw commented Sep 23, 2024

I'm not actively maintaining this repo any more - I'm actually working with Locust Cloud now. It kind of solves Locust distribution and reporting, but as-a-Service...

If you can make a very focused PR that solves this I can merge it but that's about all the time I have...

@toponim
Copy link
Author

toponim commented Sep 23, 2024

Please consider #24 for review.

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