Skip to content

Commit 0aa4854

Browse files
committed
Adopt JMH benchmarks to changed constructor signature.
[#544] Signed-off-by: Mark Paluch <[email protected]>
1 parent 47e7de0 commit 0aa4854

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/jmh/java/io/r2dbc/postgresql/codec/CodecRegistryBenchmarks.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.openjdk.jmh.infra.Blackhole;
3232

3333
import java.time.LocalDateTime;
34+
import java.time.ZoneId;
3435
import java.util.concurrent.TimeUnit;
3536

3637
import static io.r2dbc.postgresql.codec.PostgresqlObjectId.FLOAT4;
@@ -62,9 +63,11 @@ public static class CodecRegistryHolder {
6263

6364
final ByteBufAllocator byteBufAllocator = new UnpooledByteBufAllocator(false, true);
6465

65-
DefaultCodecs cacheEnabledRegistry = new DefaultCodecs(this.byteBufAllocator, false, CachedCodecLookup::new);
66+
final ZoneId zoneId = ZoneId.systemDefault();
6667

67-
DefaultCodecs cacheDisabledRegistry = new DefaultCodecs(this.byteBufAllocator, false, DefaultCodecLookup::new);
68+
DefaultCodecs cacheEnabledRegistry = new DefaultCodecs(this.byteBufAllocator, false, () -> this.zoneId, CachedCodecLookup::new);
69+
70+
DefaultCodecs cacheDisabledRegistry = new DefaultCodecs(this.byteBufAllocator, false, () -> this.zoneId, DefaultCodecLookup::new);
6871

6972
}
7073

0 commit comments

Comments
 (0)