[PATCH]support virtual table statistics
This commit is contained in:
@@ -66,15 +66,26 @@ void expr_runtime_perf_stat(struct expr_runtime *flag_rt, size_t scan_len,
|
||||
struct timespec *start, struct timespec *end,
|
||||
int thread_id);
|
||||
|
||||
void expr_runtime_scan_times_inc(struct expr_runtime *expr_rt, int thread_id);
|
||||
|
||||
long long expr_runtime_scan_times(void *expr_runtime);
|
||||
|
||||
long long expr_runtime_scan_cpu_time(void *expr_runtime);
|
||||
|
||||
long long expr_runtime_scan_bytes(struct expr_runtime *expr_rt);
|
||||
void expr_runtime_scan_bytes_add(struct expr_runtime *expr_rt, int thread_id,
|
||||
size_t scan_len);
|
||||
|
||||
long long expr_runtime_scan_bytes(void *expr_runtime);
|
||||
|
||||
void expr_runtime_hit_times_inc(struct expr_runtime *expr_rt, int thread_id);
|
||||
|
||||
long long expr_runtime_hit_times(void *expr_runtime);
|
||||
|
||||
void expr_runtime_hit_times_inc(struct expr_runtime *expr_rt, int thread_id);
|
||||
void expr_runtime_stream_scan_times_inc(struct expr_runtime_stream *expr_rt_stream,
|
||||
int thread_id);
|
||||
|
||||
void expr_runtime_stream_scan_bytes_add(struct expr_runtime_stream *expr_rt_stream,
|
||||
int thread_id, size_t scan_len);
|
||||
|
||||
void expr_runtime_stream_hit_times_inc(struct expr_runtime_stream *expr_rt_stream,
|
||||
int thread_id);
|
||||
|
||||
@@ -58,14 +58,16 @@ int flag_runtime_set_scan_district(struct flag_runtime *flag_rt, const char *dis
|
||||
void flag_runtime_perf_stat(struct flag_runtime *flag_rt, struct timespec *start,
|
||||
struct timespec *end, int thread_id);
|
||||
|
||||
void flag_runtime_scan_times_inc(struct flag_runtime *flag_rt, int thread_id);
|
||||
|
||||
long long flag_runtime_scan_times(void *flag_runtime);
|
||||
|
||||
long long flag_runtime_scan_cpu_time(void *flag_runtime);
|
||||
|
||||
long long flag_runtime_hit_times(void *flag_runtime);
|
||||
|
||||
void flag_runtime_hit_times_inc(struct flag_runtime *flag_rt, int thread_id);
|
||||
|
||||
long long flag_runtime_hit_times(void *flag_runtime);
|
||||
|
||||
long long flag_runtime_hit_item_num(void *flag_runtime);
|
||||
|
||||
long long flag_runtime_update_err_count(void *flag_runtime);
|
||||
|
||||
@@ -33,10 +33,12 @@ void *interval_runtime_new(void *interval_schema, size_t max_thread_num,
|
||||
struct log_handle *logger);
|
||||
void interval_runtime_free(void *interval_runtime);
|
||||
|
||||
int interval_runtime_update(void *interval_runtime, void *interval_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
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 maat_rt_version);
|
||||
int interval_runtime_commit(void *interval_runtime, const char *table_name,
|
||||
long long maat_rt_version);
|
||||
|
||||
long long interval_runtime_rule_count(void *interval_runtime);
|
||||
|
||||
@@ -49,17 +51,23 @@ long long interval_runtime_rule_count(void *interval_runtime);
|
||||
int interval_runtime_scan(struct interval_runtime *interval_rt, int thread_id,
|
||||
long long integer, int vtable_id, struct maat_state *state);
|
||||
|
||||
int interval_runtime_set_scan_district(struct interval_runtime *interval_rt, const char *district,
|
||||
size_t district_len, long long *district_id);
|
||||
int interval_runtime_set_scan_district(struct interval_runtime *interval_rt,
|
||||
const char *district, size_t district_len,
|
||||
long long *district_id);
|
||||
|
||||
void interval_runtime_perf_stat(struct interval_runtime *interval_rt, struct timespec *start,
|
||||
struct timespec *end, int thread_id);
|
||||
void interval_runtime_perf_stat(struct interval_runtime *interval_rt,
|
||||
struct timespec *start, struct timespec *end,
|
||||
int thread_id);
|
||||
|
||||
void interval_runtime_scan_times_inc(struct interval_runtime *interval_rt,
|
||||
int thread_id);
|
||||
|
||||
long long interval_runtime_scan_times(void *interval_runtime);
|
||||
|
||||
long long interval_runtime_scan_cpu_time(void *interval_runtime);
|
||||
|
||||
void interval_runtime_hit_times_inc(struct interval_runtime *interval_rt, int thread_id);
|
||||
void interval_runtime_hit_times_inc(struct interval_runtime *interval_rt,
|
||||
int thread_id);
|
||||
|
||||
long long interval_runtime_hit_times(void *interval_runtime);
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ int ip_runtime_scan(struct ip_runtime *ip_rt, int thread_id, int ip_type,
|
||||
void ip_runtime_perf_stat(struct ip_runtime *ip_rt, struct timespec *start,
|
||||
struct timespec *end, int thread_id);
|
||||
|
||||
void ip_runtime_scan_times_inc(struct ip_runtime *ip_rt, int thread_id);
|
||||
|
||||
long long ip_runtime_scan_times(void *ip_runtime);
|
||||
|
||||
long long ip_runtime_scan_cpu_time(void *ip_runtime);
|
||||
|
||||
@@ -107,6 +107,8 @@ long long table_manager_runtime_rule_count(struct table_manager *tbl_mgr, int ta
|
||||
|
||||
long long table_manager_runtime_scan_times(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
long long table_manager_runtime_scan_bytes(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
long long table_manager_runtime_hit_times(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
long long table_manager_runtime_scan_cpu_time(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
@@ -19,11 +19,41 @@ extern "C"
|
||||
#include "cJSON/cJSON.h"
|
||||
#include "maat_table.h"
|
||||
|
||||
struct virtual_runtime;
|
||||
|
||||
void *virtual_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
const char *table_name, struct log_handle *logger);
|
||||
|
||||
void virtual_schema_free(void *virtual_schema);
|
||||
|
||||
void *virtual_runtime_new(void *virtual_schema, size_t max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
|
||||
void virtual_runtime_free(void *virtual_runtime);
|
||||
|
||||
void virtual_runtime_scan_times_inc(struct virtual_runtime *virt_rt,
|
||||
int thread_id);
|
||||
|
||||
void virtual_runtime_scan_bytes_add(struct virtual_runtime *virt_rt,
|
||||
int thread_id, long long val);
|
||||
|
||||
long long virtual_runtime_scan_bytes(void *virt_rt);
|
||||
|
||||
long long virtual_runtime_scan_times(void *virtual_runtime);
|
||||
|
||||
long long virtual_runtime_scan_cpu_time(void *virtual_runtime);
|
||||
|
||||
void virtual_runtime_hit_times_inc(struct virtual_runtime *virt_rt,
|
||||
int thread_id);
|
||||
|
||||
long long virtual_runtime_hit_times(void *virtual_runtime);
|
||||
|
||||
void virtual_runtime_hit_item_num_add(void *virtual_runtime, int thread_id,
|
||||
long long val);
|
||||
|
||||
long long virtual_runtime_hit_item_num(void *virtual_runtime);
|
||||
|
||||
int vtable_get_physical_table_id(struct table_manager *tbl_mgr, int vtable_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user