#167 增加已拦截连接数、字节数、PASSTHROUGH连接数统计并调整FieldStat状态文件的输出位置。

This commit is contained in:
luqiuwen
2019-09-16 16:40:31 +08:00
committed by 陆秋文
parent 8c0f135877
commit f1fd1d0ad3
8 changed files with 166 additions and 275 deletions

View File

@@ -47,7 +47,7 @@ struct promise
{
struct future f;
void * ctx;
char has_timeout;
char has_timeout;
char ref_cnt;
char may_success_many_times;
promise_ctx_destroy_cb * cb_ctx_destroy;
@@ -82,7 +82,7 @@ void future_promise_library_init(const char* profile)
}
}
if(g_FP_instance.no_stats)
{
{
g_is_FP_init=1;
return;
}
@@ -101,7 +101,7 @@ void future_promise_library_init(const char* profile)
g_FP_instance.name_table=htable;
screen_stat_handle_t fs=NULL;
const char* stat_path="./future.fieldstat";
const char* stat_path="log/future.fs2";
const char* app_name="FP";
fs=FS_create_handle();
FS_set_para(fs, APP_NAME, app_name, strlen(app_name)+1);
@@ -135,7 +135,7 @@ static void __promise_destroy(struct promise *p)
if (p->cb_ctx_destroy != NULL)
{
p->cb_ctx_destroy(p->ctx);
}
}
if(!g_FP_instance.no_stats) FS_operate(g_FP_instance.fs_handle,g_FP_instance.fsid_f_num, 0, FS_OP_SUB, 1);
memset(p, 0, sizeof(struct promise));
free(p);