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 to benchmark web application end points with specific rates, if possible? #494

Open
ribubrar opened this issue Nov 4, 2022 · 3 comments

Comments

@ribubrar
Copy link

ribubrar commented Nov 4, 2022

Hi @sebastienros
I am looking to benchmark different web application endpoints with specific rates, and those endpoints are invoking methods I am looking to benchmark.

Regarding the previous thread, customizing requests per second, it works perfectly well for benchmarking the whole application at different rates.

I am wondering if I can achieve something like calling "/users" at rate 5, "/products" at rate 100, and "/customers" at rate 10?

[Route("users")]
public User GetUsers() 
{...}

[Route("products")]
public User GetProducts()
{...}

[Route("customers")]
public User GetCustomers()
{...}

Thank you in advance!

@sebastienros
Copy link
Member

Yes, the bombardier client has a rate variable that you can set in a scenario. So in your case you would have 3 scenarios, each targeting a different endpoint with a different variable like rate: 5

@ribubrar
Copy link
Author

ribubrar commented Nov 7, 2022

Thanks for that @sebastienros . Does that mean I would need to run the controller separately for each scenario?

crank --config C:\Project\benchmarks.yml --scenario users --profile local --sql "..." --table CrankResult

crank --config C:\Project\benchmarks.yml --scenario products --profile local --sql "..." --table CrankResult

crank --config C:\Project\benchmarks.yml --scenario customers --profile local --sql "..." --table CrankResult

Otherwise, is there a way I can configure the controller command to run all the scenarios in one statement?

@sebastienros
Copy link
Member

You can have multiple services in your scenario, can call them load_users, load_customer, load_products for instance, and the results would show 3 tables with different RPS. You wouldn't be able to distinguish the server-side metrics for each results though. If you care then you need 3 different runs on 3 different scenarios.

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