1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-23 13:22:36 +01:00

Add lpm preformance tests

This commit is contained in:
Pavel Odintsov 2014-11-16 21:09:16 +04:00
parent b64d359447
commit eb1f1a2dfa
4 changed files with 4 additions and 1 deletions

@ -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

@ -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

BIN
lpm_performance_tests Executable file

Binary file not shown.