perf: Optimize the output of global metrics to reduce atomic operations

This commit is contained in:
luwenpeng
2023-10-12 16:31:53 +08:00
parent 4f870de963
commit 8d1a9b3be5
10 changed files with 265 additions and 160 deletions

View File

@@ -12,6 +12,7 @@ extern "C"
#include "timestamp.h"
#include "packet_io.h"
#include "session_table.h"
#include "global_metrics.h"
#define MAX_THREAD_NUM 128
@@ -29,7 +30,8 @@ struct thread_ctx
struct packet_io *ref_io;
struct sce_ctx *ref_sce_ctx;
struct global_metrics *ref_metrics;
struct thread_metrics thread_metrics;
struct global_metrics *ref_global_metrics;
struct policy_enforcer *ref_enforcer;
int session_table_need_reset;