将kni合并到tfe中
This commit is contained in:
61
common/include/tfe_metrics.h
Normal file
61
common/include/tfe_metrics.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef _GLOBAL_METRICS_H
|
||||
#define _GLOBAL_METRICS_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "tfe_utils.h"
|
||||
#include <MESA/field_stat2.h>
|
||||
|
||||
struct global_metrics_config
|
||||
{
|
||||
char output_file[256];
|
||||
char statsd_server[32];
|
||||
int statsd_port;
|
||||
int statsd_format;
|
||||
int statsd_cycle;
|
||||
|
||||
int prometheus_listen_port;
|
||||
char prometheus_listen_url[256];
|
||||
};
|
||||
|
||||
struct global_metrics
|
||||
{
|
||||
struct throughput_metrics raw_pkt_rx; // 累计值
|
||||
struct throughput_metrics raw_pkt_tx; // 累计值
|
||||
|
||||
struct throughput_metrics hit_policy; // 累计值
|
||||
|
||||
struct throughput_metrics decrypt_tx; // 累计值
|
||||
struct throughput_metrics decrypt_rx; // 累计值
|
||||
|
||||
struct throughput_metrics ctrl_pkt_rx; // 累计值
|
||||
|
||||
uint64_t ctrl_pkt_opening_num; // 累计值
|
||||
uint64_t ctrl_pkt_active_num; // 累计值
|
||||
uint64_t ctrl_pkt_closing_num; // 累计值
|
||||
uint64_t ctrl_pkt_resetall_num; // 累计值
|
||||
uint64_t ctrl_pkt_error_num; // 累计值
|
||||
|
||||
uint64_t sf_active_times; // 累计值
|
||||
uint64_t sf_inactive_times; // 累计值
|
||||
|
||||
uint64_t session_nums; // 瞬时值
|
||||
uint64_t send_log; // 瞬时值
|
||||
|
||||
struct global_metrics_config config;
|
||||
screen_stat_handle_t fs_handle;
|
||||
int fs_id[128];
|
||||
};
|
||||
|
||||
struct global_metrics *global_metrics_create();
|
||||
void global_metrics_destory(struct global_metrics *metrics);
|
||||
void global_metrics_dump(struct global_metrics *metrics);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user