diff options
| author | luwenpeng <[email protected]> | 2020-06-11 15:37:49 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2020-06-11 17:12:01 +0800 |
| commit | 82f04dcc120b1c59b1ebe2fad7511d40cf5bb7b6 (patch) | |
| tree | b1e1a592ca9cdae5d67b9caac1668ef3522b1ef5 /common/src/tfe_future.cpp | |
| parent | 9614ea53c022b9fbf4468a22be5141fa63bb15b6 (diff) | |
TSG-1806 tfe.conf/future.conf 均增加 statsd_cycle 配置项,用于调整 fieldstat 输出周期v4.3.4-202006
Diffstat (limited to 'common/src/tfe_future.cpp')
| -rw-r--r-- | common/src/tfe_future.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/src/tfe_future.cpp b/common/src/tfe_future.cpp index 3e3fc9f..922eadc 100644 --- a/common/src/tfe_future.cpp +++ b/common/src/tfe_future.cpp @@ -18,6 +18,7 @@ struct future_promise_instance int fsid_f_num; long long f_num; int no_stats; + int statsd_cycle; MESA_htable_handle name_table; char statsd_server_ip[256]; int statsd_server_port; @@ -72,6 +73,7 @@ void future_promise_library_init(const char* profile) MESA_load_profile_string_def(profile, "STAT", "statsd_server", g_FP_instance.statsd_server_ip, sizeof(g_FP_instance.statsd_server_ip), ""); MESA_load_profile_int_def(profile, "STAT", "statsd_port", &(g_FP_instance.statsd_server_port), 0); + MESA_load_profile_int_def(profile, "STAT", "statsd_cycle", &(g_FP_instance.statsd_cycle), 2); MESA_load_profile_string_def(profile, "STAT", "histogram_bins", g_FP_instance.histogram_bins, sizeof(g_FP_instance.histogram_bins), FP_HISTOGRAM_BINS); MESA_load_profile_int_def(profile, "STAT", "print_diff", @@ -112,8 +114,7 @@ void future_promise_library_init(const char* profile) FS_set_para(fs, PRINT_MODE, &value, sizeof(value)); value=1; FS_set_para(fs, CREATE_THREAD, &value, sizeof(value)); - value=2; - FS_set_para(fs, STAT_CYCLE, &value, sizeof(value)); + FS_set_para(fs, STAT_CYCLE, &g_FP_instance.statsd_cycle, sizeof(g_FP_instance.statsd_cycle)); if(strlen(g_FP_instance.statsd_server_ip)>0 && g_FP_instance.statsd_server_port!=0) { FS_set_para(fs, STATS_SERVER_IP, g_FP_instance.statsd_server_ip, strlen(g_FP_instance.statsd_server_ip)+1); |
