Comments (6)
I didn't know that Gatling has a such feature. But yeah it should not be that hard to implement. Definitely something to be added to clj-gatling.
So in options you could either use :concurrency
or then :requests-per-second
However, I am not sure when I have time to implement this. PRs are always welcome ;)
from trombi.
I could implement this perhaps. @mhjort could you be so kind and point me where in code to look / start? Thank you!
from trombi.
Just dropping a friendly ping, I'd like this feature too :)
from trombi.
Thanks for pinging. I had a quick look on this. Noticed it requires some thinking and totally forgot to answer :(
Since this feature was proposed clj-gatling has got quite a lot of other new features. So they should be adapted too. One of those features is :concurrency-distribution
. So if new :request-per-second
option is used there should be a similar :requests-per-second-distribution
option.
The core functionality for running the simulation is in simulation.clj
. That is a good place to start. It contains a full test suite in simulation_test.clj
.
The way simulation works now is following:
- clj-gatling starts as many go loops as is the required concurrency
- go loop is inside a function called
run-scenario-constantly
- In every loop round request is started if concurrency is less than target concurrency
So the way to implement requests per second could be following:
- Start go loops based on what is the maximum requests per second
- Somehow keep track how many requests per second we are running at the moment
- In every loop round start a request if we are running less than targeted requests per second
I have not tested that idea so this probably needs some testing. However, this could be a one way where to start. Are you still interested @jakubholynet ? It would be great if you could work with this.
from trombi.
There's also this nice little library for throttling: https://github.com/brunoV/throttler. Might not be of direct use but the token bucket idea for rate limiting could be useful.
from trombi.
Thank you! I run out of time but perhaps somebody else will take the ball :-) If not, then I will the next time I have an opportunity.
from trombi.
Related Issues (20)
- An issue with async/timeout HOT 7
- Add scenario pre-hook and post-hook HOT 1
- Simulation with concurrency distribution fails when duration left unspecified HOT 3
- Upgrade http-kit for JDK 9 HOT 6
- Issues with high concurrency HOT 2
- Log timeouts HOT 1
- With uneven scenario weights some scenarios might run with concurrency 0 HOT 1
- clj-time HOT 6
- Steps running serially? HOT 3
- How to identify concurrency issues HOT 7
- Kill a simulation? HOT 2
- Add raw reporter HOT 2
- File based raw reporter does not work when there are less than 20000 requests in simulation
- Catch also AssertionErrors and mark those requests as KOs
- IndexOutOfBoundsException when splitting rate to weighted scenarios HOT 1
- Progress reporter shows negative concurrency values sometimes in the end of the simulation
- Terminate scenario early based on step function return value HOT 1
- Reporters console output is called too early before the results have been calculated
- Concurrency is higher than given in options
- Divide by zero when experimental test runner stats is enabled HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trombi.