diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c79c9bbf6..595d473c8 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -83,7 +83,7 @@ jobs: OLD_REPORT: "${{ github.workspace }}/performanceResults/performance.EmptyModels-report.json" - name: Run comparison tool for descriptions - run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p ZeroPointOnePercentDifferenceMemoryUsage + run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p ZeroPointTwoPercentDifferenceMemoryUsage shell: bash env: NEW_REPORT: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json" diff --git a/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs b/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs index ee1b2a336..6e3f518a1 100644 --- a/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs +++ b/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs @@ -31,6 +31,7 @@ public static IBenchmarkComparisonPolicy[] GetAllPolicies() return [ IdenticalMemoryUsagePolicy.Instance, ZeroPointOnePercentDifferenceMemoryUsagePolicy.Instance, + ZeroPointTwoPercentDifferenceMemoryUsagePolicy.Instance, OnePercentDifferenceMemoryUsagePolicy.Instance, TwoPercentDifferenceMemoryUsagePolicy.Instance, FivePercentDifferenceMemoryUsagePolicy.Instance, diff --git a/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs b/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs index 4e308aac4..928bfa268 100644 --- a/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs +++ b/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs @@ -9,6 +9,13 @@ internal sealed class ZeroPointOnePercentDifferenceMemoryUsagePolicy : Percentag public ZeroPointOnePercentDifferenceMemoryUsagePolicy():base(0.1f) {} } +internal sealed class ZeroPointTwoPercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static ZeroPointTwoPercentDifferenceMemoryUsagePolicy Instance { get; } = new ZeroPointTwoPercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(ZeroPointTwoPercentDifferenceMemoryUsagePolicy); + public ZeroPointTwoPercentDifferenceMemoryUsagePolicy():base(0.2f) {} +} + internal sealed class OnePercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy { public static OnePercentDifferenceMemoryUsagePolicy Instance { get; } = new OnePercentDifferenceMemoryUsagePolicy();