From 1dd0b2b3413849ef6c533e2fce7e64930cd48fe7 Mon Sep 17 00:00:00 2001 From: Mark Cilia Vincenti Date: Sun, 5 Feb 2023 10:49:37 +0100 Subject: [PATCH] Updated benchmark to use pooling --- src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs b/src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs index 0ed1abd..2d00dc4 100644 --- a/src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs +++ b/src/AsyncKeyLock.Benchmarks/BenchmarkSimpleKeyLock.cs @@ -1,5 +1,4 @@ using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Jobs; namespace AsyncKeyLock.Benchmarks; @@ -10,7 +9,10 @@ public class BenchmarkSimpleKeyLock public void GlobalSetup() { _AsyncKeyLock = new AsyncLock(); - _AsyncKeyedLock = new AsyncKeyedLock.AsyncKeyedLocker(); + _AsyncKeyedLock = new AsyncKeyedLock.AsyncKeyedLocker(o => + { + o.PoolSize = NumberOfLocks; + }); _ImageSharpWebLock = new SixLabors.ImageSharp.Web.Synchronization.AsyncKeyLock(); }