Skip to content

run BenchmarkDotNet in asp.net core webapi application type #1296

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

Closed
namnik opened this issue Oct 28, 2019 · 1 comment
Closed

run BenchmarkDotNet in asp.net core webapi application type #1296

namnik opened this issue Oct 28, 2019 · 1 comment
Labels

Comments

@namnik
Copy link

namnik commented Oct 28, 2019

I saw all examples that run in console app by calling :

BenchmarkRunner.Run();

can call this code in webapi? can call BenchmarkRunner into asp.net core weapi application?
note:
I need to benchmark my classes that have multiple inject.
with console app my IOC injection corrupted!

@adamsitnik
Copy link
Member

Hi @namnik

BenchmarkDotNet was designed for very accurate micro-benchmarking. All the metrics that we report are specific to the process which is executing the benchmark. The architecture does not have a concept of multiple processes like client and server. So we can tell you have long it takes to send a web request, but we can't report how much memory the server has allocated to handle it.

Most probably https://github.com/aspnet/Benchmarks/ is what you are looking for. It has a client-server concept and can track metrics for both. And it was designed to run web server benchmarks.

Since there is nothing actionable on our side here, I am closing the issue.

Thanks,
Adam

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

No branches or pull requests

2 participants