locust icon indicating copy to clipboard operation
locust copied to clipboard

Optimize `SequentialTaskSet`

Open bakhtos opened this issue 1 year ago • 3 comments

Fixes #2739 Fixes #2740

As explained in respective issues,SequentialTaskSet now allows task repetition if tasks is a dictionary with weight, and itertools.cycle is used to iterate over tasks in a cycle.

So far only a draft of backend changes.

Let me know if changes are OK and then I will update also tests and docs.

bakhtos avatar May 27 '24 16:05 bakhtos

Looks good to me, apart from the import sorting. Run ruff and/or install pre-commit hook (https://pre-commit.com/) to make formatting/checks happen automatically on commit!

I dont use SequentialTaskSets personally, so if there's an issue in the future I might ping you :)

cyberw avatar May 27 '24 16:05 cyberw

@cyberw Okay, I will fix the build shortly. Another question, though - should I add tests for the tasks being a dictionary in SequentialTaskSet?

bakhtos avatar May 29 '24 09:05 bakhtos

@cyberw Okay, I will fix the build shortly. Another question, though - should I add tests for the tasks being a dictionary in SequentialTaskSet?

Yes, I think that would be nice!

cyberw avatar May 29 '24 13:05 cyberw

Hi @bakhtos ! Are we ready to take this out of draft status? Maybe once you’ve updated the docs?

cyberw avatar Jul 01 '24 06:07 cyberw

@cyberw Turned out few modifications to the documentation were necessary, this is now ready

bakhtos avatar Jul 01 '24 15:07 bakhtos

Is the updated PR name ok with you?

cyberw avatar Jul 01 '24 20:07 cyberw