Coder Social home page Coder Social logo

"Sticky" user types on workers about locust HOT 4 CLOSED

mgor avatar mgor commented on June 5, 2024
"Sticky" user types on workers

from locust.

Comments (4)

mgor avatar mgor commented on June 5, 2024 1

Yeah, bad choice of word, "sacred", but I remembered about reading in some thread (or if it was in code?) that changes to it wasn't advised :)

Well, I have a couple of days now when the rest of the team has vacation that I could spend looking into it.

You are referring to "the old one", has there been a different dispatcher implementation?
I could look through the git history if that is the case.

I'll start working on a DeterministicUsersDispatcher then, instead of patching the current algorithm. Basically, not using weights, only fixed numbers and also being able to "tag" user types to a set of workers.

from locust.

cyberw avatar cyberw commented on June 5, 2024 1

The old one was completely different (locust 1.x), done on the workers not on the master (which had other limitations, because each worker had exactly the same distribution), so it is not much to look at :)

Cool! The current implementation is still pretty deterministic (so you should probably name the new one something else), it is just that it has time ticks as opposed to the old one, which had no time ticks (if I remember correctly). Probably dont want to change that in your PR, as that would be a major change :)

Perhaps it could be named CountBasedUserDispatcher? (as opposed to the current one which is "weight based")

To be able to use it fully there would need to be some ui/command line changes too (because you would specify counts for each user type instead of just a total user count), but if you build the dispatcher implementation I can help out with the other stuff.

from locust.

mgor avatar mgor commented on June 5, 2024 1

I have something working, but I want to run some extensive testing in our project before creating a PR here for it.

from locust.

cyberw avatar cyberw commented on June 5, 2024

The dispatcher code is not "sacred", but it was contributed by @mboutet and I dont know if he's still around? (so I'm hesitant to change it)

While the dispatcher implementation does seem to hold up for most use cases it is "less deterministic" than the old one and doesnt scale as well with high user, worker and user type counts.

What would be kind of cool is offering a completely separate algorithm: Not based on specifying weights and a total user count but on per-User type-numbers (like most other load test tools do it). This might involve a little more work than what you had imagined, but that would make me like the proposed change more :)

from locust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.