Created
April 12, 2021 17:02
-
-
Save sofianhamiti/7344c3a6c1a4bbe5699333d52a5c31b5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import invokust | |
| from load_test.api_user import ApiUser | |
| def run_load_test(host): | |
| settings = invokust.create_settings( | |
| classes=[ApiUser], | |
| host=host, | |
| num_users=1000, | |
| spawn_rate=100, | |
| run_time='1m' | |
| ) | |
| loadtest = invokust.LocustLoadTest(settings) | |
| loadtest.run() | |
| return loadtest.stats() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment