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

Add IAsyncEnumerable support for Consumer #1808

Open
rlgordey opened this issue Sep 13, 2021 · 5 comments
Open

Add IAsyncEnumerable support for Consumer #1808

rlgordey opened this issue Sep 13, 2021 · 5 comments

Comments

@rlgordey
Copy link

Please, add IAsyncEnumerable to list of Consume targets.

@adamsitnik adamsitnik changed the title Small request. Add IAsyncEnumerable support for Consumer Sep 13, 2021
@timcassell
Copy link
Collaborator

I'm guessing you mean when returning IAsyncEnumerable(<T>) from the benchmark method, it should await foreach on the result and measure all the awaits and yields, and pass the T yielded values to Consumer.Consume()? Otherwise, this ask wouldn't make too much sense for just Consumer.Consume(IAsyncEnumerable).

@rlgordey
Copy link
Author

I'm guessing you mean when returning IAsyncEnumerable(<T>) from the benchmark method, it should await foreach on the result and measure all the awaits and yields, and pass the T yielded values to Consumer.Consume()?

Yes @timcassell you are correct.

@timcassell
Copy link
Collaborator

timcassell commented Sep 13, 2021

In that case, this looks like a great candidate for a follow-up to my suggestion for fixing ValueTasks. #1595 (comment) Which is refactoring the engine to use an IMeasurer interface instead of System.Action WorkloadAction delegates.

[Edit] Note that this feature cannot be implemented without fixing ValueTasks, as the API relies on ValueTasks.

@timcassell
Copy link
Collaborator

For completeness, this should also include IAsyncEnumerator<T>.

@timcassell
Copy link
Collaborator

timcassell commented Mar 27, 2022

I can take this if #2111 gets merged.

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

No branches or pull requests

3 participants