nginx-module-sts icon indicating copy to clipboard operation
nginx-module-sts copied to clipboard

bugfix: the function time_queue_merge turns out to be incorrect

Open catbro666 opened this issue 4 years ago • 0 comments

The logic of ngx_http_stream_server_traffic_status_node_time_queue_merge() seems to be incorrect. The initial 0 value will also be merged. In addition, different nodes have different weight in calculation of the average. The node merged later has higher weight. (..., 1/8, 1/4, 1/2)

image

This PR changed the logic of merging, which keeps the lastest NGX_HTTP_STREAM_SERVER_TRAFFIC_STATUS_DEFAULT_QUEUE_LEN - 1 times in all queues.

catbro666 avatar Jul 30 '21 07:07 catbro666