diff --git a/build_test.bash b/build_test.bash index 7fe297b..e572f0e 100755 --- a/build_test.bash +++ b/build_test.bash @@ -1,2 +1,4 @@ #!/bin/bash g++ performance_tests.cpp -lrt -lpthread -lboost_thread -ltbb -std=c++11 + +g++ lpm_performance_tests.cpp libpatricia/patricia.o -olpm_performance_tests -lrt diff --git a/fastnetmon.cpp b/fastnetmon.cpp index d8d5946..c2fb120 100644 --- a/fastnetmon.cpp +++ b/fastnetmon.cpp @@ -779,8 +779,8 @@ void subnet_vectors_allocator(prefix_t* prefix, void* data) { // Initilize map element SubnetVectorMapFlow[subnet_as_integer] = vector_of_flow_counters(network_size_in_ips); + // On creating it initilizes by zeros conntrack_main_struct zero_conntrack_main_struct; - //memset(&zero_conntrack_main_struct, 0, sizeof(conntrack_main_struct)); std::fill(SubnetVectorMapFlow[subnet_as_integer].begin(), SubnetVectorMapFlow[subnet_as_integer].end(), zero_conntrack_main_struct); } @@ -796,6 +796,7 @@ void zeroify_all_counters() { #ifdef ENABLE_CONNTRACKING void zeroify_all_flow_counters() { + // On creating it initilizes by zeros conntrack_main_struct zero_conntrack_main_struct; // Iterate over map diff --git a/lpm_performance_tests b/lpm_performance_tests new file mode 100755 index 0000000..826accd Binary files /dev/null and b/lpm_performance_tests differ diff --git a/performance_tests.cpp b/traffic_structures_performance_tests.cpp similarity index 100% rename from performance_tests.cpp rename to traffic_structures_performance_tests.cpp