Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App-Simulator #134

Open
liamboddin opened this issue Sep 6, 2023 · 1 comment
Open

App-Simulator #134

liamboddin opened this issue Sep 6, 2023 · 1 comment
Assignees

Comments

@liamboddin
Copy link
Contributor

Create a way of simulating all the api requests made by the app to put some load on the server

@liamboddin liamboddin self-assigned this Sep 6, 2023
@NicoBiernat
Copy link
Contributor

There you go:

# Arg1: number of concurrent requests, Arg2: sleep time between request bursts in seconds
while true; do
    for i in $(seq 1 $1); do
    {
        curl -X PUT http://localhost:8080/api/vehicles/app --json '{"vehicleId":1, "pos":{"lat": 54.279806, "lng": 10.611638}, "speed":15, "heading":1}';
        printf " - Response from request: ${i}\n";
    } &
    done;
    sleep $2;
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants