Skip to content

Commit

Permalink
📝 improve log message
Browse files Browse the repository at this point in the history
  • Loading branch information
spacetourist committed Mar 28, 2024
1 parent 6da3d2f commit 9f69e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/load_balancer/lb_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static int get_dst_load(struct lb_resource **res, unsigned int res_no,
/* generate score based on the percentage of channels occupied, reduced by CPU idle factor */
if( dst->rmap[l].max_sessions ) {
av = ( 100 - ( 100 * ( dst->rmap[l].current_sessions + dst->rmap[l].sessions_since_last_heartbeat ) / dst->rmap[l].max_sessions ) ) * dst->rmap[l].cpu_idle;
LM_DBG("dst_id=%d (%s) availability score %d (sessions=%d since_last_hb=%d max_sess=%d cpu_idle=%.2f)", dst->id, dst->uri, av, dst->rmap[l].current_sessions, dst->rmap[l].sessions_since_last_heartbeat, dst->rmap[l].max_sessions, dst->rmap[l].cpu_idle);
LM_DBG("destination %d <%s> availability score %d (sessions=%d since_last_hb=%d max_sess=%d cpu_idle=%.2f)", dst->id, dst->uri, av, dst->rmap[l].current_sessions, dst->rmap[l].sessions_since_last_heartbeat, dst->rmap[l].max_sessions, dst->rmap[l].cpu_idle);
}
} else {
av = dst->rmap[l].max_load - lb_dlg_binds.get_profile_size(res[k]->profile, &dst->profile_id);
Expand Down

0 comments on commit 9f69e67

Please sign in to comment.