Skip to content

Instantly share code, notes, and snippets.

@shrekris-anyscale
Created November 22, 2022 20:23
Show Gist options
  • Save shrekris-anyscale/af323b7beadfcb10392c9886494294e3 to your computer and use it in GitHub Desktop.
Save shrekris-anyscale/af323b7beadfcb10392c9886494294e3 to your computer and use it in GitHub Desktop.
from locust import HttpUser, task
from locust.clients import HttpSession
class HelloWorldUser(HttpUser):
@task
def hello_world(self):
self.client = HttpSession(
base_url=self.client.base_url,
request_event=self.client.request_event,
user=self,
pool_manager=None,
)
self.client.get("/hello", timeout=15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment