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 Benchmarks project #864

Merged
merged 13 commits into from
Aug 25, 2021

Conversation

martincostello
Copy link
Member

A few months ago I was playing around with benchmarking Polly to see if there were any allocation-related quick wins anywhere. I didn't really get anywhere with finding any, but I figured it might be worth pushing up the benchmarks project I used for it so it can be re-used in the future.

src/Polly.Benchmarks/Polly.Benchmarks.csproj Outdated Show resolved Hide resolved
src/Polly.Benchmarks/PollyConfig.cs Outdated Show resolved Hide resolved
src/Polly.Benchmarks/PollyConfig.cs Show resolved Hide resolved
src/Polly.Benchmarks/Program.cs Outdated Show resolved Hide resolved
Add basic benchmarks project for comparing the latest* NuGet version of Polly with the local project.
Extend the retry benchmarks for more usages.
Remove the Benchmarks suffix.
Add more benchmarks for different policies.
Reuse the policies in the Retry benchmarks.
Remove benchmark that just hangs.
Add benchmarks for the cache policy using the implementation from Polly.Caching.MemoryCache.
Remove EventPipeProfiler as it doesn't seem to report anything that useful.
Remove another benchmark that just hangs indefinitely.
Also add a bulkhead policy to the PolicyWrap benchmarks.
Update to the latest release of BenchmarkDotNet.
Use Task.CompletedTask in .NET versions that support it.
Use TryGetValue() with dictionary, instead of ContainsKey() and the indexer.
Set LangVersion to latest now that BenchmarkDotNet supports it.
@martincostello martincostello marked this pull request as ready for review June 7, 2021 10:57
@martincostello
Copy link
Member Author

I'm going to merge this so we have something; we can iterate on it in the future if we desire.

@martincostello martincostello merged commit ca8f51f into App-vNext:v723-or-v730 Aug 25, 2021
@martincostello martincostello deleted the benchmarks branch August 25, 2021 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant