You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by yo...@apache.org on 2022/08/02 05:36:42 UTC
[bookkeeper] branch master updated: Revert some unwanted changes in commit 3309 (#3438)
This is an automated email from the ASF dual-hosted git repository.
yong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 942fadd439 Revert some unwanted changes in commit 3309 (#3438)
942fadd439 is described below
commit 942fadd439e4746f99c786d97cf10dc61ec5cc80
Author: Yong Zhang <zh...@gmail.com>
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
---
.../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 3682ec8dfa..c709e526ab 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
@@ -59,8 +59,8 @@ public class DigestTypeBenchmark {
* BufferType.
*/
public enum BufferType {
-// ARRAY_BACKED,
-// NOT_ARRAY_BACKED,
+ ARRAY_BACKED,
+ NOT_ARRAY_BACKED,
BYTE_BUF_DEFAULT_ALLOC
}
@@ -68,8 +68,8 @@ public class DigestTypeBenchmark {
* Digest.
*/
public enum Digest {
-// MAC,
-// CRC32,
+ MAC,
+ CRC32,
CRC32_C,
}
@@ -137,10 +137,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:
@@ -150,12 +150,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);
}