Possibility to benchmark asynchronous methods
See original GitHub issueI would like to add support for benchmarking asynchronous methods.
Please post your requirements here, I want to know what people need.
What should be supported:
-
Task<T>
returning methods -
Task
returning methods -
ValueTask<T>
returning methods (since we target .NET 4.5 we can have it!) -
async void
returning methods (edit: we throw NotSupportedException in that case) - custom task schedulers
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Async vs Sync Benchmark (.NET)
The use of asynchronous operations instead of synchronous doesn't help to improve performance or user experience directly. First of all, it ...
Read more >The performance characteristics of async methods in C# - ...
The idea of this benchmark is to show that the overhead of an async method that does a relatively small amount of work...
Read more >Asynchronous Programming - Async Performance
When designing asynchronous methods, the Framework developers spent a lot of time optimizing away object allocations. This is because allocations represent one ...
Read more >Testing Asynchronous Methods - Java Extreme ...
Testing Asynchronous Methods Problem You want to test asynchronous methods. Solution Use a mock listener to wait for the asynchronous method to complete....
Read more >Benchmark of asynchronous code
To benchmark asynchronous code, you measure its performance in the usual way, and compare it to its non-synchronous equivalent. Time for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
async void
should return a bad practice won’t benchmark error 😉Been doing some poor async benchmarking here https://github.com/dotnet/roslyn/issues/10449#issuecomment-234792163
@adamsitnik, the
async
branch LGTM. I suggest to merge it into master.Yep, concurrent benchmarks are in the roadmap. But it’s not easy to add this feature because of some CPU “features” like false sharing. Also it requires major changes of MethodInvoker because we have to change the current approach with fixed amount of iterations.