wip, might not be good
This commit is contained in:
parent
f53879f961
commit
6d5bfaeeda
63 changed files with 1897 additions and 93 deletions
18
load_test.py
Normal file
18
load_test.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from locust import HttpUser, between, task
|
||||
|
||||
from learn_sql_model.factories.hero import HeroFactory
|
||||
from learn_sql_model.models.hero import HeroCreate
|
||||
|
||||
|
||||
class QuickstartUser(HttpUser):
|
||||
wait_time = between(1, 2)
|
||||
|
||||
@task
|
||||
def hello_world(self):
|
||||
self.client.get("/hero/1")
|
||||
self.client.get("/heros/")
|
||||
|
||||
@task(3)
|
||||
def create_hero(self):
|
||||
hero = HeroFactory().build()
|
||||
HeroCreate(**hero.dict()).post()
|
||||
Loading…
Add table
Add a link
Reference in a new issue