summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-04-11 16:30:21 +0800
committerluwenpeng <[email protected]>2024-04-11 16:33:35 +0800
commit84541c40e2e0bad5c0ab847724a0dc68266c598f (patch)
tree4b1d46432218e0e2dcdf7362b2c2f35c9452920a /deps
parentcfbad63021242f1471f491f4cfdbc40fe17d52da (diff)
Refactor main loop
Diffstat (limited to 'deps')
-rw-r--r--deps/dablooms/test/gtest_dablooms.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/deps/dablooms/test/gtest_dablooms.cpp b/deps/dablooms/test/gtest_dablooms.cpp
index 7dc9468..93ad757 100644
--- a/deps/dablooms/test/gtest_dablooms.cpp
+++ b/deps/dablooms/test/gtest_dablooms.cpp
@@ -14,20 +14,6 @@ struct packet_idetify
unsigned int ip_dst;
} __attribute__((packed, aligned(1)));
-struct config
-{
- int enable;
-
- unsigned int capacity;
- double error_rate;
- int expiry_time;
-} config = {
- .enable = 1,
- .capacity = 1000000,
- .error_rate = 0.00001,
- .expiry_time = 3,
-};
-
struct packet_idetify idetify = {
.tcp_seq = 2172673142,
.tcp_ack = 2198097831,
@@ -41,7 +27,7 @@ struct packet_idetify idetify = {
TEST(DABLOOMS, TEST)
{
- struct expiry_dablooms_handle *handle = expiry_dablooms_new(config.capacity, config.error_rate, 1, config.expiry_time);
+ struct expiry_dablooms_handle *handle = expiry_dablooms_new(1000000, 0.00001, 1, 3);
EXPECT_TRUE(handle != nullptr);
EXPECT_TRUE(expiry_dablooms_search(handle, (const char *)&idetify, sizeof(idetify), 1) != 1); // no exist