From ae3c5927a7a2897ecfd4ada5fdb69d5bcf96ad81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:45:13 +0000 Subject: [PATCH 1/2] Bump BenchmarkDotNet from 0.13.12 to 0.14.0 Bumps [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet) from 0.13.12 to 0.14.0. - [Release notes](https://github.com/dotnet/BenchmarkDotNet/releases) - [Commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.12...v0.14.0) --- updated-dependencies: - dependency-name: BenchmarkDotNet dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../BitFaster.Caching.Benchmarks.csproj | 2 +- .../BitFaster.Caching.ThroughputAnalysis.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj b/BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj index 11d69738..491cf7f3 100644 --- a/BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj +++ b/BitFaster.Caching.Benchmarks/BitFaster.Caching.Benchmarks.csproj @@ -20,7 +20,7 @@ - + diff --git a/BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj b/BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj index 66d4416d..01680205 100644 --- a/BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj +++ b/BitFaster.Caching.ThroughputAnalysis/BitFaster.Caching.ThroughputAnalysis.csproj @@ -16,7 +16,7 @@ - + From 1a38175bc71a34e290dd81f97976b15792cbd0ae Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Wed, 14 Aug 2024 10:55:48 -0700 Subject: [PATCH 2/2] fix measurementstats --- .../MeasurementsStatistics.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BitFaster.Caching.ThroughputAnalysis/MeasurementsStatistics.cs b/BitFaster.Caching.ThroughputAnalysis/MeasurementsStatistics.cs index 728e2d11..60bdc438 100644 --- a/BitFaster.Caching.ThroughputAnalysis/MeasurementsStatistics.cs +++ b/BitFaster.Caching.ThroughputAnalysis/MeasurementsStatistics.cs @@ -42,7 +42,8 @@ public static MeasurementsStatistics Calculate(List measurements, Outlie double variance = Variance(measurements, n, mean); double standardDeviation = Math.Sqrt(variance); double standardError = standardDeviation / Math.Sqrt(n); - var confidenceInterval = new ConfidenceInterval(mean, standardError, n); + var confidenceIntervalEstimator = new ConfidenceIntervalEstimator(n, mean, standardError); + var confidenceInterval = confidenceIntervalEstimator.ConfidenceInterval(ConfidenceLevel.L999); if (outlierMode == OutlierMode.DontRemove) // most simple scenario is done without allocations! but this is not the default case return new MeasurementsStatistics(standardError, mean, confidenceInterval); @@ -69,7 +70,8 @@ public static MeasurementsStatistics Calculate(List measurements, Outlie variance = VarianceWithoutOutliers(outlierMode, measurements, n, mean, lowerFence, upperFence); standardDeviation = Math.Sqrt(variance); standardError = standardDeviation / Math.Sqrt(n); - confidenceInterval = new ConfidenceInterval(mean, standardError, n); + confidenceIntervalEstimator = new ConfidenceIntervalEstimator(n, mean, standardError); + confidenceInterval = confidenceIntervalEstimator.ConfidenceInterval(ConfidenceLevel.L999); return new MeasurementsStatistics(standardError, mean, confidenceInterval); }