diff options
| author | yangwei <[email protected]> | 2024-07-16 11:37:41 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-07-16 15:34:50 +0800 |
| commit | 7d5aafea3d0eb667073f89fce53d1d0d3cc97b12 (patch) | |
| tree | 0d3bffd92233742bb543d1465de726b0d646ae88 /include | |
| parent | e812eeead6504aefb6af49d7531f10616708d465 (diff) | |
✨ feat(sapp metrics): add fs4 as metrics exporter
Diffstat (limited to 'include')
| -rw-r--r-- | include/private/sapp_declaration.h | 8 | ||||
| -rw-r--r-- | include/private/sapp_global_val.h | 12 |
2 files changed, 18 insertions, 2 deletions
diff --git a/include/private/sapp_declaration.h b/include/private/sapp_declaration.h index e02df12..4d11b23 100644 --- a/include/private/sapp_declaration.h +++ b/include/private/sapp_declaration.h @@ -23,7 +23,7 @@ extern volatile long long g_current_time_ms; #define MAX_DEFALUT_TIMEOUT_S 86400 -/* ��Ƕ�ײ��̫��, ʹ�ü������ */ +/* ��Ƕ�ײ��̫��, ʹ�ü������ */ #define ABBR_SAPP_LOG_HANDLE sapp_global_val->individual_fixed.log_handle #define ABBR_SAPP_PLUGIN_LOG_HANDLE sapp_global_val->individual_fixed.plugin_log_handle @@ -57,13 +57,14 @@ extern volatile long long g_current_time_ms; #define ABBR_SYSINFO_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_sapp_sysinfo_log_absolute #define ABBR_FS2_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_sapp_fs2_log_absolute #define ABBR_FS3_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_sapp_fs3_log_absolute +#define ABBR_FS4_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_sapp_fs4_log_absolute #define ABBR_PROCESS_LATENTCY_DATA_FILE sapp_global_val->config.data_file_path.data_sapp_fs2_process_latency_absolute #define ABBR_INLINE_KEEPALIVE_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_inline_keepalive_log_absolute #define ABBR_LOAD_PLUG_STAT_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_load_plugin_stat_log_absolute #define ABBR_MARSIO_LIBRARY_FILE sapp_global_val->config.library_file_path.libmarsio_file_path #define ABBR_MEMORY_STAT_LOG_DATA_FILE sapp_global_val->config.data_file_path.data_memory_stat_log_absolute -/* ��֮ǰ��ɢ��ȫ�ֱ���ǿ�Ƹ���Ϊ�µ�ȫ�ֱ��� */ +/* ��֮ǰ��ɢ��ȫ�ֱ���ǿ�Ƹ���Ϊ�µ�ȫ�ֱ��� */ #define g_CurrentTime_ms g_current_time_ms #define g_CurrentTime g_current_time #define g_sapp_log_handle sapp_global_val->individual_fixed.log_handle @@ -138,6 +139,9 @@ void sapp_fs2_set_plug_entry_latency(int entry_id, long long time_cost); void sapp_fs3_metric_incrby(int column_idx, int column_idy,long long value); void sapp_fs3_metric_set(int metric_idx, int metric_idy, long long value); +void sapp_fs4_metric_incrby(int column_idx, int column_idy,long long value); +void sapp_fs4_metric_set(int metric_idx, int metric_idy, long long value); + int sapp_independent_thread_init(void); void sapp_gval_init(void); diff --git a/include/private/sapp_global_val.h b/include/private/sapp_global_val.h index 39f5923..51a8152 100644 --- a/include/private/sapp_global_val.h +++ b/include/private/sapp_global_val.h @@ -151,6 +151,7 @@ typedef struct{ sapp_config_profiling_log_t log; sapp_config_profiling_metric_t fs2; sapp_config_profiling_metric_t fs3; + sapp_config_profiling_metric_t fs4; //process_latency and sanity_check char process_latency_log_category[NAME_MAX]; @@ -329,6 +330,10 @@ typedef struct{ const char *data_sapp_fs3_log_relative; const char *data_sapp_fs3_log_absolute; + + const char *data_sapp_fs4_log_relative; + const char *data_sapp_fs4_log_absolute; + const char *data_sapp_fs2_process_latency_relative; const char *data_sapp_fs2_process_latency_absolute; @@ -397,6 +402,12 @@ typedef struct{ int metrics_ids[2][SAPP_STAT_NUM_MAX]; }sapp_gval_individual_fixed_fs3_t; + +typedef struct{ + struct fieldstat_easy *fs_metric_handle; + int metrics_ids[2][SAPP_STAT_NUM_MAX]; +}sapp_gval_individual_fixed_fs4_t; + typedef struct{ void *log_handle; /* runtime.log */ void *plugin_log_handle; /* runtime.log */ @@ -410,6 +421,7 @@ typedef struct{ sapp_gval_individual_fixed_fs2_t fs2_runtime; sapp_gval_individual_fixed_fs3_t fs3_runtime; + sapp_gval_individual_fixed_fs4_t fs4_runtime; pthread_t thread_obtain_id[SAPP_MAX_THREADS]; pid_t thread_tid[SAPP_MAX_THREADS]; |
