Skip to content

Stress Application

Stress

Install

  • Amazon Linux 2023
    sudo yum install -y stress
    
  • Amazon Linux 2
    sudo amazon-linux-extras install epel -y
    sudo yum install stress -y
    

Start

stress -c 1 # <number of cores>

Locust

Install

pip install locust

Write Python File

locustfile.py
from locust import task, FastHttpUser

class MyUser(FastHttpUser):
    @task
    def index(self):
        self.client.get("/v1/match", params={"token":"cccccccc"})

Start

locust -f locustfile.py