diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 377e2d8027b..03f6532ad30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 - name: Setup NuGet cache - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props') }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index baede35787c..1b3fdc7339d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,21 +34,21 @@ jobs: uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 - name: Setup NuGet cache - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props') }} restore-keys: ${{ runner.os }}-nuget- - name: Initialize CodeQL - uses: github/codeql-action/init@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/init@701f152f28d4350ad289a5e31435e9ab6169a7ca # v2.21.6 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/autobuild@701f152f28d4350ad289a5e31435e9ab6169a7ca # v2.21.6 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/analyze@701f152f28d4350ad289a5e31435e9ab6169a7ca # v2.21.6 with: category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b03ca9c3113..bfd9eca242f 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -18,4 +18,4 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Review dependencies - uses: actions/dependency-review-action@f6fff72a3217f580d5afd49a46826795305b63c7 # v3.0.8 + uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0 diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 4bb8a9a000a..f85bbba5601 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -39,6 +39,6 @@ jobs: retention-days: 5 - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5 + uses: github/codeql-action/upload-sarif@701f152f28d4350ad289a5e31435e9ab6169a7ca # v2.21.6 with: sarif_file: results.sarif diff --git a/Directory.Packages.props b/Directory.Packages.props index 71e44834045..8529180a129 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - + @@ -22,7 +22,7 @@ - + diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.BridgeBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.BridgeBenchmark-report-github.md index 832cc614837..a0bff219f65 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.BridgeBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.BridgeBenchmark-report-github.md @@ -1,15 +1,15 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | -|----------------------- |---------:|--------:|--------:|------:|--------:|-------:|----------:|------------:| -| NoOpAsync | 113.0 ns | 1.65 ns | 2.47 ns | 1.00 | 0.00 | 0.0120 | 304 B | 1.00 | -| NullResiliencePipeline | 509.4 ns | 2.95 ns | 4.32 ns | 4.51 | 0.10 | 0.0143 | 376 B | 1.24 | +| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | +|----------------------- |----------:|---------:|---------:|------:|--------:|-------:|----------:|------------:| +| NoOpAsync | 94.51 ns | 1.617 ns | 2.370 ns | 1.00 | 0.00 | 0.0120 | 304 B | 1.00 | +| NullResiliencePipeline | 504.23 ns | 1.305 ns | 1.954 ns | 5.34 | 0.13 | 0.0143 | 376 B | 1.24 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerBenchmark-report-github.md index 99c2aa12c5b..001796c4113 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerBenchmark-report-github.md @@ -1,15 +1,15 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | -|------------------------- |---------:|---------:|----------:|---------:|------:|--------:|-------:|----------:|------------:| -| ExecuteCircuitBreaker_V7 | 306.1 ns | 2.26 ns | 3.31 ns | 305.9 ns | 1.00 | 0.00 | 0.0200 | 504 B | 1.00 | -| ExecuteCircuitBreaker_V8 | 676.4 ns | 79.03 ns | 115.84 ns | 610.7 ns | 2.21 | 0.36 | - | - | 0.00 | +| Method | Mean | Error | StdDev | Ratio | Gen0 | Allocated | Alloc Ratio | +|------------------------- |---------:|--------:|--------:|------:|-------:|----------:|------------:| +| ExecuteCircuitBreaker_V7 | 338.5 ns | 1.52 ns | 2.22 ns | 1.00 | 0.0200 | 504 B | 1.00 | +| ExecuteCircuitBreaker_V8 | 557.9 ns | 1.74 ns | 2.49 ns | 1.65 | - | - | 0.00 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerOpenedBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerOpenedBenchmark-report-github.md index a274424dac0..d12be31e3de 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerOpenedBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CircuitBreakerOpenedBenchmark-report-github.md @@ -1,16 +1,16 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | -|-------------------------- |------------:|----------:|----------:|------:|--------:|-------:|----------:|------------:| -| ExecuteAsync_Exception_V7 | 30,519.7 ns | 621.36 ns | 891.14 ns | 38.69 | 1.25 | 0.0916 | 2888 B | 15.04 | -| ExecuteAsync_Exception_V8 | 20,804.6 ns | 144.38 ns | 192.74 ns | 26.34 | 0.24 | 0.0610 | 1816 B | 9.46 | -| ExecuteAsync_Outcome_V8 | 789.8 ns | 3.93 ns | 5.37 ns | 1.00 | 0.00 | 0.0076 | 192 B | 1.00 | +| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | +|-------------------------- |------------:|---------:|---------:|------:|--------:|-------:|----------:|------------:| +| ExecuteAsync_Exception_V7 | 29,867.4 ns | 35.32 ns | 50.66 ns | 41.19 | 0.64 | 0.0916 | 2888 B | 15.04 | +| ExecuteAsync_Exception_V8 | 20,525.5 ns | 21.19 ns | 31.71 ns | 28.32 | 0.41 | 0.0610 | 1816 B | 9.46 | +| ExecuteAsync_Outcome_V8 | 724.8 ns | 7.24 ns | 10.84 ns | 1.00 | 0.00 | 0.0076 | 192 B | 1.00 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CreationBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CreationBenchmark-report-github.md index 5dd9e8d5e2a..49c4bd8147d 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CreationBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.CreationBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,5 +11,5 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Gen0 | Allocated | |------------ |-----------:|---------:|---------:|-------:|----------:| -| Fallback_V7 | 127.9 ns | 5.55 ns | 7.96 ns | 0.0191 | 480 B | -| Fallback_V8 | 3,633.8 ns | 60.79 ns | 89.11 ns | 0.2136 | 5432 B | +| Fallback_V7 | 105.2 ns | 1.67 ns | 2.39 ns | 0.0191 | 480 B | +| Fallback_V8 | 3,330.7 ns | 27.26 ns | 40.80 ns | 0.2022 | 5152 B | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.GenericOverheadBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.GenericOverheadBenchmark-report-github.md index 59f30a25579..e0fb3ded814 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.GenericOverheadBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.GenericOverheadBenchmark-report-github.md @@ -1,15 +1,15 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Ratio | RatioSD | Allocated | Alloc Ratio | -|------------------------ |---------:|---------:|---------:|------:|--------:|----------:|------------:| -| ExecuteAsync_Generic | 31.14 ns | 1.280 ns | 1.876 ns | 1.00 | 0.00 | - | NA | -| ExecuteAsync_NonGeneric | 32.97 ns | 0.438 ns | 0.585 ns | 1.06 | 0.07 | - | NA | +| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Allocated | Alloc Ratio | +|------------------------ |---------:|---------:|---------:|---------:|------:|--------:|----------:|------------:| +| ExecuteAsync_Generic | 30.07 ns | 0.242 ns | 0.363 ns | 30.07 ns | 1.00 | 0.00 | - | NA | +| ExecuteAsync_NonGeneric | 36.89 ns | 5.655 ns | 8.289 ns | 32.49 ns | 1.23 | 0.27 | - | NA | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.HedgingBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.HedgingBenchmark-report-github.md index 8876420ac40..78f1c349209 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.HedgingBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.HedgingBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,7 +11,7 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | |---------------------------- |---------:|----------:|----------:|------:|--------:|-------:|----------:|------------:| -| Hedging_Primary | 1.578 μs | 0.0409 μs | 0.0600 μs | 1.00 | 0.00 | - | 40 B | 1.00 | -| Hedging_Secondary | 2.593 μs | 0.0139 μs | 0.0200 μs | 1.64 | 0.06 | 0.0076 | 232 B | 5.80 | -| Hedging_Primary_AsyncWork | 4.177 μs | 0.1108 μs | 0.1589 μs | 2.65 | 0.17 | 0.0534 | 1516 B | 37.90 | -| Hedging_Secondary_AsyncWork | 5.804 μs | 0.1582 μs | 0.2319 μs | 3.68 | 0.20 | 0.0687 | 1888 B | 47.20 | +| Hedging_Primary | 1.432 μs | 0.0042 μs | 0.0061 μs | 1.00 | 0.00 | - | 40 B | 1.00 | +| Hedging_Secondary | 2.253 μs | 0.0051 μs | 0.0075 μs | 1.57 | 0.01 | 0.0038 | 184 B | 4.60 | +| Hedging_Primary_AsyncWork | 3.903 μs | 0.0260 μs | 0.0381 μs | 2.73 | 0.03 | 0.0610 | 1636 B | 40.90 | +| Hedging_Secondary_AsyncWork | 4.936 μs | 0.0424 μs | 0.0595 μs | 3.45 | 0.05 | 0.0687 | 1838 B | 45.95 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.MultipleStrategiesBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.MultipleStrategiesBenchmark-report-github.md index 0f7ceae5565..1613ad6309d 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.MultipleStrategiesBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.MultipleStrategiesBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,8 +11,8 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | |----------------------------------------------- |---------:|----------:|----------:|------:|--------:|-------:|----------:|------------:| -| ExecuteStrategyPipeline_Generic_V7 | 2.357 μs | 0.0277 μs | 0.0406 μs | 1.00 | 0.00 | 0.1106 | 2824 B | 1.00 | -| ExecuteStrategyPipeline_Generic_V8 | 2.237 μs | 0.0235 μs | 0.0344 μs | 0.95 | 0.03 | - | 40 B | 0.01 | -| ExecuteStrategyPipeline_GenericTelemetry_V8 | 3.489 μs | 0.0342 μs | 0.0501 μs | 1.48 | 0.03 | - | 40 B | 0.01 | -| ExecuteStrategyPipeline_NonGeneric_V8 | 2.457 μs | 0.0137 μs | 0.0193 μs | 1.04 | 0.02 | - | 40 B | 0.01 | -| ExecuteStrategyPipeline_NonGenericTelemetry_V8 | 3.777 μs | 0.0361 μs | 0.0541 μs | 1.60 | 0.02 | - | 40 B | 0.01 | +| ExecuteStrategyPipeline_Generic_V7 | 2.277 μs | 0.0133 μs | 0.0191 μs | 1.00 | 0.00 | 0.1106 | 2824 B | 1.00 | +| ExecuteStrategyPipeline_Generic_V8 | 2.089 μs | 0.0105 μs | 0.0157 μs | 0.92 | 0.01 | - | 40 B | 0.01 | +| ExecuteStrategyPipeline_GenericTelemetry_V8 | 3.034 μs | 0.0117 μs | 0.0175 μs | 1.33 | 0.01 | - | 40 B | 0.01 | +| ExecuteStrategyPipeline_NonGeneric_V8 | 2.380 μs | 0.0076 μs | 0.0113 μs | 1.05 | 0.01 | - | 40 B | 0.01 | +| ExecuteStrategyPipeline_NonGenericTelemetry_V8 | 3.542 μs | 0.0178 μs | 0.0266 μs | 1.56 | 0.02 | - | 40 B | 0.01 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PipelineBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PipelineBenchmark-report-github.md index 60b33dc4465..5a202198041 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PipelineBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PipelineBenchmark-report-github.md @@ -1,24 +1,24 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Components | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | -|------------------- |----------- |-----------:|---------:|---------:|------:|--------:|-------:|----------:|------------:| -| **ExecutePipeline_V7** | **1** | **108.5 ns** | **2.65 ns** | **3.96 ns** | **1.00** | **0.00** | **0.0120** | **304 B** | **1.00** | -| ExecutePipeline_V8 | 1 | 103.9 ns | 1.96 ns | 2.68 ns | 0.96 | 0.03 | - | - | 0.00 | -| | | | | | | | | | | -| **ExecutePipeline_V7** | **2** | **261.3 ns** | **3.89 ns** | **5.83 ns** | **1.00** | **0.00** | **0.0219** | **552 B** | **1.00** | -| ExecutePipeline_V8 | 2 | 140.8 ns | 3.49 ns | 5.01 ns | 0.54 | 0.03 | - | - | 0.00 | -| | | | | | | | | | | -| **ExecutePipeline_V7** | **5** | **876.3 ns** | **5.80 ns** | **8.13 ns** | **1.00** | **0.00** | **0.0515** | **1296 B** | **1.00** | -| ExecutePipeline_V8 | 5 | 362.9 ns | 2.66 ns | 3.99 ns | 0.41 | 0.01 | - | - | 0.00 | -| | | | | | | | | | | -| **ExecutePipeline_V7** | **10** | **1,897.9 ns** | **13.50 ns** | **19.37 ns** | **1.00** | **0.00** | **0.0992** | **2536 B** | **1.00** | -| ExecutePipeline_V8 | 10 | 714.8 ns | 3.27 ns | 4.69 ns | 0.38 | 0.00 | - | - | 0.00 | +| Method | Components | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | +|------------------- |----------- |------------:|----------:|----------:|-----------:|------:|--------:|-------:|----------:|------------:| +| **ExecutePipeline_V7** | **1** | **121.39 ns** | **2.173 ns** | **3.253 ns** | **122.0 ns** | **1.00** | **0.00** | **0.0120** | **304 B** | **1.00** | +| ExecutePipeline_V8 | 1 | 98.02 ns | 2.387 ns | 3.499 ns | 101.3 ns | 0.81 | 0.03 | - | - | 0.00 | +| | | | | | | | | | | | +| **ExecutePipeline_V7** | **2** | **278.13 ns** | **3.703 ns** | **5.428 ns** | **279.0 ns** | **1.00** | **0.00** | **0.0219** | **552 B** | **1.00** | +| ExecutePipeline_V8 | 2 | 130.69 ns | 1.098 ns | 1.610 ns | 129.4 ns | 0.47 | 0.01 | - | - | 0.00 | +| | | | | | | | | | | | +| **ExecutePipeline_V7** | **5** | **916.09 ns** | **7.794 ns** | **11.666 ns** | **917.8 ns** | **1.00** | **0.00** | **0.0515** | **1296 B** | **1.00** | +| ExecutePipeline_V8 | 5 | 324.87 ns | 1.751 ns | 2.621 ns | 324.5 ns | 0.35 | 0.01 | - | - | 0.00 | +| | | | | | | | | | | | +| **ExecutePipeline_V7** | **10** | **1,863.84 ns** | **10.049 ns** | **15.041 ns** | **1,865.4 ns** | **1.00** | **0.00** | **0.0992** | **2536 B** | **1.00** | +| ExecutePipeline_V8 | 10 | 701.09 ns | 0.939 ns | 1.346 ns | 700.7 ns | 0.38 | 0.00 | - | - | 0.00 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PredicateBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PredicateBenchmark-report-github.md index 8f8520457f6..eb082779c98 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PredicateBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.PredicateBenchmark-report-github.md @@ -1,15 +1,15 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Allocated | Alloc Ratio | -|--------------------------- |---------:|---------:|---------:|---------:|------:|--------:|----------:|------------:| -| Predicate_SwitchExpression | 16.87 ns | 0.049 ns | 0.071 ns | 16.87 ns | 1.00 | 0.00 | - | NA | -| Predicate_PredicateBuilder | 31.32 ns | 1.550 ns | 2.172 ns | 30.12 ns | 1.86 | 0.13 | - | NA | +| Method | Mean | Error | StdDev | Ratio | RatioSD | Allocated | Alloc Ratio | +|--------------------------- |---------:|---------:|---------:|------:|--------:|----------:|------------:| +| Predicate_SwitchExpression | 16.69 ns | 0.035 ns | 0.051 ns | 1.00 | 0.00 | - | NA | +| Predicate_PredicateBuilder | 34.01 ns | 0.297 ns | 0.445 ns | 2.04 | 0.02 | - | NA | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RateLimiterBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RateLimiterBenchmark-report-github.md index c980c7857bf..b0d7785fccf 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RateLimiterBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RateLimiterBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,5 +11,5 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | |---------------------- |---------:|--------:|--------:|------:|--------:|-------:|----------:|------------:| -| ExecuteRateLimiter_V7 | 243.5 ns | 3.71 ns | 5.44 ns | 1.00 | 0.00 | 0.0148 | 376 B | 1.00 | -| ExecuteRateLimiter_V8 | 292.8 ns | 3.76 ns | 5.51 ns | 1.20 | 0.05 | 0.0014 | 40 B | 0.11 | +| ExecuteRateLimiter_V7 | 255.7 ns | 2.83 ns | 4.24 ns | 1.00 | 0.00 | 0.0148 | 376 B | 1.00 | +| ExecuteRateLimiter_V8 | 276.4 ns | 2.34 ns | 3.43 ns | 1.08 | 0.03 | 0.0014 | 40 B | 0.11 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineBenchmark-report-github.md index bde40ade7ab..4b746b47077 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineBenchmark-report-github.md @@ -1,20 +1,20 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Mean | Error | StdDev | Median | Ratio | RatioSD | Allocated | Alloc Ratio | -|----------------------------------------------- |----------:|---------:|---------:|----------:|------:|--------:|----------:|------------:| -| ExecuteOutcomeAsync | 78.00 ns | 0.300 ns | 0.439 ns | 77.95 ns | 1.00 | 0.00 | - | NA | -| ExecuteAsync_ResilienceContextAndState | 183.18 ns | 1.886 ns | 2.705 ns | 183.73 ns | 2.35 | 0.04 | - | NA | -| ExecuteAsync_CancellationToken | 190.95 ns | 2.795 ns | 4.008 ns | 194.12 ns | 2.45 | 0.05 | - | NA | -| ExecuteAsync_GenericStrategy_CancellationToken | 193.67 ns | 0.283 ns | 0.397 ns | 193.65 ns | 2.48 | 0.01 | - | NA | -| Execute_ResilienceContextAndState | 90.29 ns | 1.422 ns | 2.128 ns | 89.71 ns | 1.16 | 0.03 | - | NA | -| Execute_CancellationToken | 83.25 ns | 0.948 ns | 1.418 ns | 83.02 ns | 1.07 | 0.02 | - | NA | -| Execute_GenericStrategy_CancellationToken | 78.66 ns | 0.446 ns | 0.625 ns | 78.53 ns | 1.01 | 0.01 | - | NA | +| Method | Mean | Error | StdDev | Ratio | RatioSD | Allocated | Alloc Ratio | +|----------------------------------------------- |----------:|---------:|---------:|------:|--------:|----------:|------------:| +| ExecuteOutcomeAsync | 77.62 ns | 0.101 ns | 0.141 ns | 1.00 | 0.00 | - | NA | +| ExecuteAsync_ResilienceContextAndState | 182.77 ns | 0.330 ns | 0.473 ns | 2.35 | 0.01 | - | NA | +| ExecuteAsync_CancellationToken | 194.84 ns | 0.935 ns | 1.370 ns | 2.51 | 0.02 | - | NA | +| ExecuteAsync_GenericStrategy_CancellationToken | 186.25 ns | 0.724 ns | 1.039 ns | 2.40 | 0.02 | - | NA | +| Execute_ResilienceContextAndState | 87.34 ns | 1.062 ns | 1.557 ns | 1.13 | 0.02 | - | NA | +| Execute_CancellationToken | 81.51 ns | 0.834 ns | 1.248 ns | 1.05 | 0.02 | - | NA | +| Execute_GenericStrategy_CancellationToken | 80.56 ns | 0.626 ns | 0.937 ns | 1.04 | 0.01 | - | NA | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineProviderBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineProviderBenchmark-report-github.md index e99b138b4ea..7cd1e3450cc 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineProviderBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.ResiliencePipelineProviderBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,5 +11,5 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Allocated | |----------------------- |---------:|---------:|---------:|----------:| -| GetPipeline_Ok | 19.03 ns | 0.169 ns | 0.248 ns | - | -| GetPipeline_Generic_Ok | 51.66 ns | 1.960 ns | 2.811 ns | - | +| GetPipeline_Ok | 19.46 ns | 0.021 ns | 0.031 ns | - | +| GetPipeline_Generic_Ok | 47.83 ns | 0.058 ns | 0.086 ns | - | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RetryBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RetryBenchmark-report-github.md index 1a2920d3932..5c275894707 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RetryBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.RetryBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,5 +11,5 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | |---------------- |---------:|--------:|--------:|------:|--------:|-------:|----------:|------------:| -| ExecuteRetry_V7 | 246.2 ns | 3.22 ns | 4.83 ns | 1.00 | 0.00 | 0.0219 | 552 B | 1.00 | -| ExecuteRetry_V8 | 367.7 ns | 3.71 ns | 5.56 ns | 1.49 | 0.05 | - | - | 0.00 | +| ExecuteRetry_V7 | 264.8 ns | 5.22 ns | 7.81 ns | 1.00 | 0.00 | 0.0219 | 552 B | 1.00 | +| ExecuteRetry_V8 | 317.3 ns | 0.83 ns | 1.24 ns | 1.20 | 0.03 | - | - | 0.00 | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TelemetryBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TelemetryBenchmark-report-github.md index ee0356d7f2c..d270909776e 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TelemetryBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TelemetryBenchmark-report-github.md @@ -1,17 +1,17 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 ``` -| Method | Telemetry | Enrichment | Mean | Error | StdDev | Median | Allocated | -|-------- |---------- |----------- |-----------:|--------:|--------:|-----------:|----------:| -| **Execute** | **False** | **False** | **110.6 ns** | **1.95 ns** | **2.73 ns** | **111.6 ns** | **-** | -| **Execute** | **False** | **True** | **113.2 ns** | **1.47 ns** | **2.11 ns** | **114.3 ns** | **-** | -| **Execute** | **True** | **False** | **988.1 ns** | **5.08 ns** | **7.28 ns** | **987.2 ns** | **-** | -| **Execute** | **True** | **True** | **1,403.0 ns** | **4.47 ns** | **6.26 ns** | **1,400.6 ns** | **-** | +| Method | Telemetry | Enrichment | Mean | Error | StdDev | Median | Allocated | +|-------- |---------- |----------- |-----------:|---------:|---------:|-----------:|----------:| +| **Execute** | **False** | **False** | **102.2 ns** | **0.37 ns** | **0.54 ns** | **101.9 ns** | **-** | +| **Execute** | **False** | **True** | **104.9 ns** | **0.40 ns** | **0.56 ns** | **105.3 ns** | **-** | +| **Execute** | **True** | **False** | **838.8 ns** | **5.01 ns** | **7.50 ns** | **836.5 ns** | **-** | +| **Execute** | **True** | **True** | **1,279.6 ns** | **10.57 ns** | **15.82 ns** | **1,276.6 ns** | **-** | diff --git a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TimeoutBenchmark-report-github.md b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TimeoutBenchmark-report-github.md index 7c14a42a5a0..a275c2fb74f 100644 --- a/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TimeoutBenchmark-report-github.md +++ b/bench/BenchmarkDotNet.Artifacts/results/Polly.Core.Benchmarks.TimeoutBenchmark-report-github.md @@ -1,9 +1,9 @@ ``` -BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2134/22H2/2022Update/SunValley2) (Hyper-V) +BenchmarkDotNet v0.13.7, Windows 11 (10.0.22621.2283/22H2/2022Update/SunValley2) (Hyper-V) Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores -.NET SDK 7.0.400 - [Host] : .NET 7.0.10 (7.0.1023.36312), X64 RyuJIT AVX2 +.NET SDK 7.0.401 + [Host] : .NET 7.0.11 (7.0.1123.42427), X64 RyuJIT AVX2 Job=MediumRun Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=2 WarmupCount=10 @@ -11,5 +11,5 @@ LaunchCount=2 WarmupCount=10 ``` | Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio | |------------------ |---------:|--------:|--------:|------:|--------:|-------:|----------:|------------:| -| ExecuteTimeout_V7 | 401.2 ns | 6.30 ns | 9.43 ns | 1.00 | 0.00 | 0.0286 | 728 B | 1.00 | -| ExecuteTimeout_V8 | 365.6 ns | 3.12 ns | 4.67 ns | 0.91 | 0.03 | - | - | 0.00 | +| ExecuteTimeout_V7 | 437.9 ns | 5.98 ns | 8.58 ns | 1.00 | 0.00 | 0.0286 | 728 B | 1.00 | +| ExecuteTimeout_V8 | 349.0 ns | 3.97 ns | 5.56 ns | 0.80 | 0.02 | - | - | 0.00 | diff --git a/docs/index.md b/docs/index.md index 93d79bc78f0..515c721d794 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,57 +1,45 @@ -# Polly Documentation +# Meet Polly: The .NET resilience library -Polly is a .NET resilience and transient-fault-handling library that allows developers to express resilience strategies such as Retry, Circuit Breaker, Hedging, Timeout, Rate Limiter and Fallback in a fluent and thread-safe manner. +![Polly logo](https://raw.github.com/App-vNext/Polly/main/Polly-Logo.png) -We are a member of the [.NET Foundation](https://www.dotnetfoundation.org/about)! +Polly is a powerful library for .NET that helps you handle transient faults and improve the resilience of your applications. With Polly, you can easily define and apply strategies such as Retry, Circuit Breaker, Hedging, Timeout, Rate Limiter and Fallback to handle failures and slowdowns in a fluent and thread-safe way. -![Polly logo](https://raw.github.com/App-vNext/Polly/main/Polly-Logo.png) +Polly is part of the [.NET Foundation](https://www.dotnetfoundation.org/about)! ## What can Polly do for you? Polly lets you express different resilience strategies to cope with various scenarios, such as: -- [Retry](strategies/retry.md): Automatically retry failed requests after a short delay. Useful for transient errors that may self-correct. -- [Circuit Breaker](strategies/circuit-breaker.md): Fail fast and stop making requests when a system is overloaded or unhealthy. Useful for protecting a system from further damage and giving it time to recover. -- [Timeout](strategies/timeout.md): Set a maximum time limit for a request and abort it if it takes too long. Useful for avoiding indefinite waits and freeing up resources. -- [Rate Limiter](strategies/rate-limiter.md): Control the rate of requests to a system and reject or queue them if they exceed the limit. Useful for managing load and preventing throttling or overloading. -- [Fallback](strategies/fallback.md): Provide an alternative response or action in case of failure. Useful for degrading gracefully and maintaining user experience. -- [Hedging](strategies/hedging.md): Execute parallel requests when a system is slow and take the fastest one. Useful for reducing latency and improving responsiveness. +- [Retry](strategies/retry.md): Try again if something fails. This can be useful when the problem is temporary and might go away. +- [Circuit Breaker](strategies/circuit-breaker.md): Stop trying if something is broken or busy. This can benefit you by avoiding wasting time and making things worse. It can also support the system to recover. +- [Timeout](strategies/timeout.md): Give up if something takes too long. This can improve your performance by freeing up space and resources. +- [Rate Limiter](strategies/rate-limiter.md): Limit how many requests you make or accept. This can enable you to control the load and prevent problems or penalties. +- [Fallback](strategies/fallback.md): Do something else if something fails. This can improve your user experience and keep the program working. +- [Hedging](strategies/hedging.md): Do more than one thing at the same time and take the fastest one. This can make your program faster and more responsive. -You can learn more about each strategy and how to configure it in the [resilience strategies](strategies/index.md) section. +You can learn more about each strategy and how to use them [resilience strategies](strategies/index.md) section. -## Getting started +## How to get started with Polly? -Polly is easy to install and use. You can follow the [getting started](getting-started.md) guide to set up Polly in your project and start applying resilience strategies in your projects. +Polly is easy to install and use. You can follow the [getting started](getting-started.md) guide to add Polly to your project and use it for your requests. -## Articles +## Where to find more information? -- [Introduction](index.md): General information about the project and its goals. -- [Getting started](getting-started.md): A guide to help you get started with the project. -- Resilience strategies: A collection of strategies for improving the resilience of your system. - - [Timeout](strategies/timeout.md): A strategy for setting a maximum time limit for a request. - - [Retry](strategies/retry.md): A strategy for retrying failed requests. - - [Rate limiter](strategies/rate-limiter.md): A strategy for limiting the rate of requests. - - [Hedging](strategies/hedging.md): A strategy for hedging against long request times. - - [Fallback](strategies/fallback.md): A strategy for providing a fallback response in case of failure. - - [Circuit breaker](strategies/circuit-breaker.md): A strategy for breaking the circuit when a system is down. -- Resilience pipelines: Understanding the use of resilience pipelines. - - [Resilience pipeline registry](pipelines/resilience-pipeline-registry.md): Exploring the registry that stores resilience pipelines. -- vanced topics: A collection of advanced topics for further learning. - - [Telemetry and monitoring](advanced/telemetry.md): Insights into telemetry generated by resilience pipelines and strategies. - - [Chaos engineering](advanced/simmy.md): Get to know chaos engineering via the project's capabilities. - - [Dependency injection](advanced/dependency-injection.md): How the project integrates with Dependency Injection. -- Community and resources: A collection of resources and community contributions. - - [Polly-Contrib projects and libraries](community/polly-contrib.md): Learn how to contribute to and extend the project ecosystem. - - [Libraries and contributions](community/libraries-and-contributions.md): Find out which libraries the project depends on and who contributes to its development. - - [Useful resources and links](community/resources.md): Browse through blogs, podcasts, courses, e-books, and other community resources. -- [API](api/index.md): The API documentation for the project. +Polly has a rich documentation that covers various topics, such as: -## Articles (previous Polly versions) +- [Resilience strategies](strategies/index.md): A collection of strategies for improving the resilience of your system. +- [Resilience pipelines](pipelines/index.md): How to combine and reuse strategies in a flexible and modular way. +- [Telemetry and monitoring](advanced/telemetry.md): How to access and analyze the data generated by Polly strategies and pipelines. +- [Dependency injection](advanced/dependency-injection.md): How to integrate Polly with dependency injection frameworks and containers. +- [Extensibility](advanced/extensibility.md): How to create and use custom strategies and extensions for Polly. +- [Chaos engineering](advanced/simmy.md): How to use Polly to inject faults and test the resilience of your system. -- [Extensibility (v7)](v7/extensibility.md): Learn how you can extend Polly with new policies. - -## Samples +You can also find many resources and community contributions, such as: - [Samples](https://github.com/App-vNext/Polly/tree/main/samples): Samples in this repository that serve as an introduction to Polly. -- [Polly-Samples](https://github.com/App-vNext/Polly-Samples): Contains practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community. +- [Practical Samples](https://github.com/App-vNext/Polly-Samples): Practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community. +- [Polly-Contrib](community/polly-contrib.md)): Community projects and libraries that extend and enhance Polly's functionality and ecosystem. +- [Libraries and contributions](community/libraries-and-contributions.html): Dependencies and contributors that make Polly possible and awesome. - Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Microservices architecture and using Polly for resilience. + +You can browse the documentation using the sidebar or visit the [API](api/index.md) section for the reference documentation. diff --git a/docs/migration-v8.md b/docs/migration-v8.md new file mode 100644 index 00000000000..5be94d682ba --- /dev/null +++ b/docs/migration-v8.md @@ -0,0 +1 @@ +# Migration guide from v7 to v8 diff --git a/docs/strategies/index.md b/docs/strategies/index.md index a6e071b8f99..f44ecadab78 100644 --- a/docs/strategies/index.md +++ b/docs/strategies/index.md @@ -10,18 +10,20 @@ Polly categorizes resilience strategies into two main groups: - **Reactive**: These strategies handle specific exceptions that are thrown, or results that are returned, by the callbacks executed through the strategy. - **Proactive**: Unlike reactive strategies, proactive strategies do not focus on handling errors by the callbacks might throw or return. They can make proactive decisions to cancel or reject the execution of callbacks (e.g., using a rate limiter or a timeout resilience strategy). +## Built-in strategies + | Strategy | Reactive | Premise | AKA | How does the strategy mitigate?| | ------------- | --- | ------------- |:-------------: |------------- | -|[Retry](retry.md) |Yes|Many faults are transient and may self-correct after a short delay.| *Maybe it's just a blip* | Allows configuring automatic retries. | -|[Circuit Breaker](circuit-breaker.md) |Yes|When a system is seriously struggling, failing fast is better than making users/callers wait.

Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts*

*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. | -|[Timeout](timeout.md)|No|Beyond a certain wait, a success result is unlikely.| *Don't wait forever* |Guarantees the caller won't have to wait beyond the timeout. | -|[Rate Limiter](rate-limiter.md)|No|Limiting the rate a system handles requests is another way to control load.

This can apply to the way your system accepts incoming calls, and/or to the way you call downstream services. | *Slow down a bit, will you?* |Constrains executions to not exceed a certain rate. | -|[Fallback](fallback.md)|Yes|Things will still fail - plan what you will do when that happens.| *Degrade gracefully* |Defines an alternative value to be returned (or action to be executed) on failure. | -|[Hedging](hedging.md)|Yes|Things can be slow sometimes, plan what you will do when that happens.| *Hedge your bets* | Executes parallel actions when things are slow and waits for the fastest one. | +|[Retry](strategies/retry.md) |Yes|Many faults are transient and may self-correct after a short delay.| *Maybe it's just a blip* | Allows configuring automatic retries. | +|[Circuit-breaker](strategies/circuit-breaker.md) |Yes|When a system is seriously struggling, failing fast is better than making users/callers wait.

Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts*

*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. | +|[Timeout](strategies/timeout.md)|No|Beyond a certain wait, a success result is unlikely.| *Don't wait forever* |Guarantees the caller won't have to wait beyond the timeout. | +|[Rate Limiter](strategies/rate-limiter.md)|No|Limiting the rate a system handles requests is another way to control load.

This can apply to the way your system accepts incoming calls, and/or to the way you call downstream services. | *Slow down a bit, will you?* |Constrains executions to not exceed a certain rate. | +|[Fallback](strategies/fallback.md)|Yes|Things will still fail - plan what you will do when that happens.| *Degrade gracefully* |Defines an alternative value to be returned (or action to be executed) on failure. | +|[Hedging](strategies/hedging.md)|Yes|Things can be slow sometimes, plan what you will do when that happens.| *Hedge your bets* | Executes parallel actions when things are slow and waits for the fastest one. | ## Usage -Extensions for adding resilience strategies to the builders are provided by each strategy. Depending on the type of strategy, these extensions may be available for both `ResiliencePipelineBuilder` and `ResiliencePipelineBuilder` or just one of them. Proactive strategies like timeout or rate limiter are available for both types of builders, while specialized reactive strategies are only available for `ResiliencePipelineBuilder`. Adding multiple resilience strategies is supported. +Extensions for adding resilience strategies to e builders are provided by each strategy. Depending on the type of strategy, these extensions may be available for both `ResiliencePipelineBuilder` and `ResiliencePipelineBuilder` or just one of them. Proactive strategies like timeout or rate limiter are available for both types of builders, while specialized reactive strategies are only available for `ResiliencePipelineBuilder`. Adding multiple resilience strategies is supported. Each resilience strategy provides: diff --git a/docs/toc.yml b/docs/toc.yml index cab21e5f685..8d2c16f1158 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -4,6 +4,9 @@ - name: Getting started href: getting-started.md +- name: Migrate to v8 + href: migration-v8.md + - name: Resilience strategies href: strategies/index.md expanded: true diff --git a/global.json b/global.json index d728838e56b..01254ddc770 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.400", + "version": "7.0.401", "allowPrerelease": false, "rollForward": "latestMajor" }