add rule count stat
This commit is contained in:
@@ -46,6 +46,8 @@ int bool_plugin_runtime_update(void *bool_plugin_runtime, void *bool_plugin_sche
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int bool_plugin_runtime_commit(void *bool_plugin_runtime, const char *table_name);
|
||||
|
||||
long long bool_plugin_runtime_rule_count(void *bool_plugin_runtime);
|
||||
|
||||
struct ex_data_runtime *bool_plugin_runtime_get_ex_data_rt(void *bool_plugin_runtime);
|
||||
|
||||
int bool_plugin_runtime_get_ex_data(void *bool_plugin_runtime, unsigned long long *item_ids,
|
||||
|
||||
@@ -55,6 +55,8 @@ int compile_runtime_update(void *compile_runtime, void *compile_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int compile_runtime_commit(void *compile_runtime, const char *table_name);
|
||||
|
||||
long long compile_runtime_rule_count(void *compile_runtime);
|
||||
|
||||
int compile_runtime_match(struct compile_runtime *compile_rt, long long *compile_ids,
|
||||
size_t compile_ids_size, struct maat_state *state);
|
||||
|
||||
@@ -79,6 +81,7 @@ void group2compile_runtime_free(void *g2c_runtime);
|
||||
int group2compile_runtime_update(void *g2c_runtime, void *g2c_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
long long group2compile_runtime_rule_count(void *g2c_runtime);
|
||||
|
||||
/* maat compile state API */
|
||||
struct maat_compile_state;
|
||||
|
||||
@@ -37,6 +37,8 @@ int expr_runtime_update(void *expr_runtime, void *expr_schema,
|
||||
int valid_column);
|
||||
int expr_runtime_commit(void *expr_runtime, const char *table_name);
|
||||
|
||||
long long expr_runtime_rule_count(void *expr_runtime);
|
||||
|
||||
/* expr runtime scan API */
|
||||
/**
|
||||
* @brief scan string to get hit group_ids
|
||||
@@ -47,6 +49,7 @@ int expr_runtime_scan(struct expr_runtime *expr_rt, int thread_id, const char *d
|
||||
size_t data_len, int vtable_id, struct maat_state *state);
|
||||
|
||||
struct adapter_hs_stream *expr_runtime_stream_open(struct expr_runtime *expr_rt, int thread_id);
|
||||
|
||||
int expr_runtime_stream_scan(struct expr_runtime *expr_rt, struct adapter_hs_stream *s_handle,
|
||||
const char *data, size_t data_len,
|
||||
int vtable_id, struct maat_state *state);
|
||||
|
||||
@@ -39,6 +39,8 @@ int flag_runtime_update(void *flag_runtime, void *flag_schema,
|
||||
int valid_column);
|
||||
int flag_runtime_commit(void *flag_runtime, const char *table_name);
|
||||
|
||||
long long flag_runtime_rule_count(void *flag_runtime);
|
||||
|
||||
/* flag runtime scan API */
|
||||
/**
|
||||
* @brief scan flag to get hit group_ids
|
||||
|
||||
@@ -48,6 +48,8 @@ int fqdn_plugin_runtime_update(void *fqdn_plugin_runtime, void *fqdn_plugin_sche
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int fqdn_plugin_runtime_commit(void *fqdn_plugin_runtime, const char *table_name);
|
||||
|
||||
long long fqdn_plugin_runtime_rule_count(void *fqdn_plugin_runtime);
|
||||
|
||||
struct ex_data_runtime *fqdn_plugin_runtime_get_ex_data_rt(void *fqdn_plugin_runtime);
|
||||
|
||||
int fqdn_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, const char *fqdn,
|
||||
|
||||
@@ -51,6 +51,8 @@ int group2group_runtime_update(void *g2g_runtime, void *g2g_schema,
|
||||
int valid_column);
|
||||
int group2group_runtime_commit(void *g2g_runtime, const char *table_name);
|
||||
|
||||
long long group2group_runtime_rule_count(void *g2g_runtime);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,8 @@ int interval_runtime_update(void *interval_runtime, void *interval_schema,
|
||||
const char *table_name,const char *line, int valid_column);
|
||||
int interval_runtime_commit(void *interval_runtime, const char *table_name);
|
||||
|
||||
long long interval_runtime_rule_count(void *interval_runtime);
|
||||
|
||||
/* interval runtime scan API */
|
||||
/**
|
||||
* @brief scan intval to get hit group_ids
|
||||
|
||||
@@ -36,6 +36,8 @@ int ip_runtime_update(void *ip_runtime, void *ip_schema,
|
||||
int valid_column);
|
||||
int ip_runtime_commit(void *ip_runtime, const char *table_name);
|
||||
|
||||
long long ip_runtime_rule_count(void *ip_runtime);
|
||||
|
||||
/* ip runtime scan API */
|
||||
int ip_runtime_scan(struct ip_runtime *ip_rt, int thread_id, int ip_type,
|
||||
uint8_t *ip_addr, uint16_t port, int proto, int vtable_id,
|
||||
|
||||
@@ -47,6 +47,8 @@ int ip_plugin_runtime_update(void *ip_plugin_runtime, void *ip_plugin_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int ip_plugin_runtime_commit(void *ip_plugin_runtime, const char *table_name);
|
||||
|
||||
long long ip_plugin_runtime_rule_count(void *ip_plugin_runtime);
|
||||
|
||||
struct ex_data_runtime *ip_plugin_runtime_get_ex_data_rt(void *ip_plugin_runtime);
|
||||
|
||||
int ip_plugin_runtime_get_ex_data(void *ip_plugin_runtime, const struct ip_addr *ip_addr,
|
||||
|
||||
@@ -60,6 +60,8 @@ int plugin_runtime_update(void *plugin_runtime, void *plugin_schema,
|
||||
int valid_column);
|
||||
int plugin_runtime_commit(void *plugin_runtime, const char *table_name);
|
||||
|
||||
long long plugin_runtime_rule_count(void *plugin_runtime);
|
||||
|
||||
struct ex_data_runtime *plugin_runtime_get_ex_data_rt(void *plugin_runtime);
|
||||
|
||||
size_t plugin_runtime_cached_row_count(void *plugin_runtime);
|
||||
|
||||
@@ -72,6 +72,8 @@ void *table_manager_get_runtime(struct table_manager *tbl_mgr, int table_id);
|
||||
int table_manager_update_runtime(struct table_manager *tbl_mgr, const char *table_name, int table_id, const char *line);
|
||||
void table_manager_commit_runtime(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
long long table_manager_runtime_rule_count(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user