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

How do I do a load test for POST/PUT apis #193

Open
jo19in1 opened this issue Sep 19, 2022 · 3 comments
Open

How do I do a load test for POST/PUT apis #193

jo19in1 opened this issue Sep 19, 2022 · 3 comments

Comments

@jo19in1
Copy link

jo19in1 commented Sep 19, 2022

  1. Please give an example on how to use multiple POST apis for a test.
    Ex: api A has to be hit at 40k rpm
    api B has to be hit at 32k rpm
    api C at 20k rpm and so on.

  2. What configuration machine will I need to achieve the above test?

@jo19in1
Copy link
Author

jo19in1 commented Sep 20, 2022

Also how do i pass CSV files as input

@hatoo
Copy link
Owner

hatoo commented Sep 20, 2022

Please give an example on how to use multiple POST apis for a test.

oha doesn't support multiple targets.
drill maybe better to such a usecase.

But you can run multiple oha parallely in shell.

# `oha` only supports RPS(request per second) so I divided 40k by 60
oha --no-tui -z 10s -q 66000 {API A} &
oha --no-tui -z 10s -q 50000 {API B} &
oha --no-tui -z 10s -q 3300 {API C}

What configuration machine will I need to achieve the above test?

I don't know. Maybe you want to increase the limit of number of open files for a proccess to bigger concurrency (-c option).

Also how do i pass CSV files as input

It depends your API's spec.
If you just put a CSV file to body, you can run by

oha -D {path to CSV} {URL}

@jo19in1
Copy link
Author

jo19in1 commented Sep 21, 2022

Thank you for your answer, I was looking to take data for POST calls from a CSV.

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

No branches or pull requests

2 participants