Skip to content

Instantly share code, notes, and snippets.

@sofianhamiti
Created April 12, 2021 17:02
Show Gist options
  • Save sofianhamiti/7344c3a6c1a4bbe5699333d52a5c31b5 to your computer and use it in GitHub Desktop.
Save sofianhamiti/7344c3a6c1a4bbe5699333d52a5c31b5 to your computer and use it in GitHub Desktop.
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