question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility to benchmark asynchronous methods

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
benaadamscommented, Jul 24, 2016

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

0reactions
AndreyAkinshincommented, Aug 3, 2016

@adamsitnik, the async branch LGTM. I suggest to merge it into master.

I know that @AndreyAkinshin has also some ideas for concurrent benchmarks for 1.0

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found