These results are generated by a gatling simulation that ramps 100 user over 10 second and then keeps the users constant at that rate for 60 seconds before ramping again by 100 users. The entire scenario runs from 0 to 1000 users.
Last active
April 1, 2023 14:33
-
-
Save roadsideseb/7a9c8809a76b3b82712ca241285dca9d to your computer and use it in GitHub Desktop.
Load testing Python web apps with Gatling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class flaskGunicornConstantRamp extends Simulation { | |
val flaskGunicorn = http.baseURL("http://flask-gunicorn:8080") | |
val scn = scenario( | |
"flask - gunicorn " + | |
"(" + Constants.Workers + " workers ) - " + | |
Constants.ConcurrentUsers + " users") | |
.exec(http("Endpoint " + Constants.Endpoint).get(Constants.Endpoint)) | |
val rampTime = 10 seconds | |
val runTime = 60 seconds | |
setUp( | |
scn.inject( | |
rampUsersPerSec(0) to(100) during(rampTime), | |
constantUsersPerSec(100) during(runTime), | |
rampUsersPerSec(100) to(200) during(rampTime), | |
constantUsersPerSec(200) during(runTime), | |
rampUsersPerSec(200) to(300) during(rampTime), | |
constantUsersPerSec(300) during(runTime), | |
rampUsersPerSec(300) to(400) during(rampTime), | |
constantUsersPerSec(400) during(runTime), | |
rampUsersPerSec(400) to(500) during(rampTime), | |
constantUsersPerSec(500) during(runTime), | |
rampUsersPerSec(500) to(600) during(rampTime), | |
constantUsersPerSec(600) during(runTime), | |
rampUsersPerSec(600) to(700) during(rampTime), | |
constantUsersPerSec(700) during(runTime), | |
rampUsersPerSec(700) to(800) during(rampTime), | |
constantUsersPerSec(800) during(runTime), | |
rampUsersPerSec(800) to(900) during(rampTime), | |
constantUsersPerSec(900) during(runTime), | |
rampUsersPerSec(900) to(1000) during(rampTime), | |
constantUsersPerSec(1000) during(runTime) | |
).protocols(flaskGunicorn) | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ConfigVersion": 3, | |
"Driver": { | |
"IPAddress": "βββββββββββ", | |
"MachineName": "gatling-test-server", | |
"SSHUser": "root", | |
"SSHPort": 22, | |
"SSHKeyPath": "~/.docker/machine/machines/gatling-test-server/id_rsa", | |
"StorePath": "~/.docker/machine", | |
"SwarmMaster": false, | |
"SwarmHost": "tcp://0.0.0.0:3376", | |
"SwarmDiscovery": "", | |
"AccessToken": "ββββββββ", | |
"DropletID": "ββββββββ", | |
"DropletName": "", | |
"Image": "ubuntu-16-04-x64", | |
"Region": "tor1", | |
"SSHKeyID": "ββββββββ", | |
"SSHKeyFingerprint": "", | |
"SSHKey": "", | |
"Size": "2gb", | |
"IPv6": false, | |
"Backups": false, | |
"PrivateNetworking": false, | |
"UserDataFile": "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment