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 RateLimit benchmarks #910

Merged

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Jan 17, 2022

Details on the issue fix or feature implementation

Add benchmarks for the rate-limit policy added by #903.

This won't work until 7.2.3 is actually released to NuGet.org.

Results from a local run without a baseline are below.

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1466 (21H1/May2021Update)
Intel Core i9-9980HK CPU 2.40GHz, 1 CPU, 16 logical and 8 physical cores
.NET SDK=6.0.101
  [Host]    : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
  Polly-dev : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Job=Polly-dev  Arguments=/p:BenchmarkFromNuGet=False,/p:SignAssembly=false  
Method Mean Error StdDev Gen 0 Allocated
RateLimit_Synchronous_Succeeds 59.66 ns 0.593 ns 0.555 ns 0.0296 248 B
RateLimit_Asynchronous_Succeeds 140.89 ns 2.772 ns 2.314 ns 0.0477 400 B
RateLimit_Synchronous_With_Result_Succeeds 49.59 ns 0.429 ns 0.401 ns 0.0191 160 B
RateLimit_Asynchronous_With_Result_Succeeds 107.90 ns 2.142 ns 3.072 ns 0.0191 160 B

Confirm the following

  • I started this PR by branching from the head of the latest dev vX.Y branch, or I have rebased on the latest dev vX.Y branch, or I have merged the latest changes from the dev vX.Y branch
  • I have targeted the PR to merge into the latest dev vX.Y branch as the base branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

Add benchmarks for the rate-limit policy.
@martincostello martincostello mentioned this pull request Jan 17, 2022
4 tasks
@martincostello martincostello changed the base branch from v723-or-v730 to v731-or-v740 January 17, 2022 13:27
@martincostello martincostello changed the base branch from v731-or-v740 to v724-or-v730 January 17, 2022 16:56
The latest release is 7.2.3, not 7.3.0.
@martincostello martincostello marked this pull request as ready for review January 17, 2022 16:59
@martincostello martincostello merged commit ac01478 into App-vNext:v724-or-v730 Jan 17, 2022
@martincostello martincostello deleted the Rate-Limit-Benchmark branch January 17, 2022 17:19
@martincostello martincostello added this to the v7.2.4 milestone Jun 13, 2023
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.

1 participant