This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch branch-4.15 in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit 38d4ad921157ca1b39fadd8468406f86728b9fd8 Author: Yong Zhang <[email protected]> AuthorDate: Tue Aug 2 13:36:35 2022 +0800 Revert some unwanted changes in commit 3309 (#3438) --- *Motivation* There are some unwanted changes committed by 3309 https://github.com/apache/bookkeeper/pull/3309 (cherry picked from commit 942fadd439e4746f99c786d97cf10dc61ec5cc80) --- .../proto/checksum/DigestTypeBenchmark.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/microbenchmarks/src/main/java/org/apache/bookkeeper/proto/checksum/DigestTypeBenchmark.java b/microbenchmarks/src/main/java/org/apache/bookkeeper/proto/checksum/DigestTypeBenchmark.java index dca06e1d0e..b7f094bc61 100644 --- a/microbenchmarks/src/main/java/org/apache/bookkeeper/proto/checksum/DigestTypeBenchmark.java +++ b/microbenchmarks/src/main/java/org/apache/bookkeeper/proto/checksum/DigestTypeBenchmark.java @@ -61,8 +61,8 @@ public class DigestTypeBenchmark { * BufferType. */ public enum BufferType { -// ARRAY_BACKED, -// NOT_ARRAY_BACKED, + ARRAY_BACKED, + NOT_ARRAY_BACKED, BYTE_BUF_DEFAULT_ALLOC } @@ -70,8 +70,8 @@ public class DigestTypeBenchmark { * Digest. */ public enum Digest { -// MAC, -// CRC32, + MAC, + CRC32, CRC32_C, } @@ -139,10 +139,10 @@ public class DigestTypeBenchmark { public ByteBuf getByteBuff(BufferType bType) { switch (bType) { -// case ARRAY_BACKED: -// return arrayBackedBuffer; -// case NOT_ARRAY_BACKED: -// return notArrayBackedBuffer; + case ARRAY_BACKED: + return arrayBackedBuffer; + case NOT_ARRAY_BACKED: + return notArrayBackedBuffer; case BYTE_BUF_DEFAULT_ALLOC: return byteBufDefaultAlloc; default: @@ -152,12 +152,12 @@ public class DigestTypeBenchmark { public DigestManager getDigestManager(Digest digest) { switch (digest) { -// case CRC32: -// return crc32; + case CRC32: + return crc32; case CRC32_C: return crc32c; -// case MAC: -// return mac; + case MAC: + return mac; default: throw new IllegalArgumentException("unknown digest " + digest); }
