diff options
| author | luwenpeng <[email protected]> | 2023-11-24 15:17:18 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2023-11-24 15:40:58 +0800 |
| commit | eedd18183ea5b06947079984de83cd145684cd38 (patch) | |
| tree | a8d6c2ef10391c0602df6532ee6c23f47a2c441d /platform/src/policy.cpp | |
| parent | bda50d79af1f7c59f5ab71fdefff06e3e3397be2 (diff) | |
perf: 优化session_ctx减少内存占用; 优化global metrics的结构
Diffstat (limited to 'platform/src/policy.cpp')
| -rw-r--r-- | platform/src/policy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/src/policy.cpp b/platform/src/policy.cpp index 4fbe4ce..018c15a 100644 --- a/platform/src/policy.cpp +++ b/platform/src/policy.cpp @@ -1194,7 +1194,7 @@ static void select_sf_by_ldbc(struct sff_param *sff_param, struct selected_sf *s memset(selected_sf->sf_dst_mac, 0, sizeof(selected_sf->sf_dst_mac)); if (health_check_session_get_mac(sf_param->health_check_session_id, selected_sf->sf_dst_mac) == 0) { - ATOMIC_INC(&(thread_metrics->sf_status.active)); + ATOMIC_INC(&(thread_metrics->sf_active)); LOG_INFO("%s: session %lu %s select sf by ldbc, sf_profile_id %d to be selected", LOG_TAG_POLICY, s_ctx->session_id, s_ctx->session_addr, sf_param->sf_profile_id); selected_sf_set_action(selected_sf, ACTION_FORWAED_DUE_SELECTED_SF); selected_sf_set_info(selected_sf, sf_param); @@ -1202,7 +1202,7 @@ static void select_sf_by_ldbc(struct sff_param *sff_param, struct selected_sf *s } else { - ATOMIC_INC(&(thread_metrics->sf_status.inactive)); + ATOMIC_INC(&(thread_metrics->sf_inactive)); if (handle_fail_action(&sff_param->sff_exception, selected_sf, utarray_len(sf_array) - 1) == 0) { LOG_INFO("%s: session %lu %s select sf by re-dispatch, sf_profile_id %d to be excluded", LOG_TAG_POLICY, s_ctx->session_id, s_ctx->session_addr, sf_param->sf_profile_id); |
