mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
MINOR: stream: rename {srv,prx}_queue_size to *_queue_pos
The current name is misleading as it implies a queue size, but the value instead indicates a position in the queue. The value is only the queue size at the exact moment the element is enqueued. Soon we will gain the ability to insert anywhere into the queue, upon which clarity of the name is more important.
This commit is contained in:
parent
66425e31b5
commit
ffe5e8c638
@ -105,8 +105,8 @@ struct strm_logs {
|
||||
long t_connect; /* delay before the connect() to the server succeeds, -1 if never occurs */
|
||||
long t_data; /* delay before the first data byte from the server ... */
|
||||
unsigned long t_close; /* total stream duration */
|
||||
unsigned long srv_queue_size; /* number of streams waiting for a connect slot on this server at accept() time (in direct assignment) */
|
||||
unsigned long prx_queue_size; /* overall number of streams waiting for a connect slot on this instance at accept() time */
|
||||
unsigned long srv_queue_pos; /* number of streams de-queued while waiting for a connection slot on this server */
|
||||
unsigned long prx_queue_pos; /* number of streams de-qeuued while waiting for a connection slot on this instance */
|
||||
long long bytes_in; /* number of bytes transferred from the client to the server */
|
||||
long long bytes_out; /* number of bytes transferred from the server to the client */
|
||||
};
|
||||
|
@ -2135,7 +2135,7 @@ int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list
|
||||
break;
|
||||
|
||||
case LOG_FMT_SRVQUEUE: // %sq
|
||||
ret = ltoa_o(s->logs.srv_queue_size, tmplog, dst + maxsize - tmplog);
|
||||
ret = ltoa_o(s->logs.srv_queue_pos, tmplog, dst + maxsize - tmplog);
|
||||
if (ret == NULL)
|
||||
goto out;
|
||||
tmplog = ret;
|
||||
@ -2143,7 +2143,7 @@ int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list
|
||||
break;
|
||||
|
||||
case LOG_FMT_BCKQUEUE: // %bq
|
||||
ret = ltoa_o(s->logs.prx_queue_size, tmplog, dst + maxsize - tmplog);
|
||||
ret = ltoa_o(s->logs.prx_queue_pos, tmplog, dst + maxsize - tmplog);
|
||||
if (ret == NULL)
|
||||
goto out;
|
||||
tmplog = ret;
|
||||
|
@ -4426,8 +4426,8 @@ void http_end_txn_clean_session(struct stream *s)
|
||||
s->logs.t_connect = -1;
|
||||
s->logs.t_data = -1;
|
||||
s->logs.t_close = 0;
|
||||
s->logs.prx_queue_size = 0; /* we get the number of pending conns before us */
|
||||
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
||||
s->logs.prx_queue_pos = 0; /* we get the number of pending conns before us */
|
||||
s->logs.srv_queue_pos = 0; /* we will get this number soon */
|
||||
|
||||
s->logs.bytes_in = s->req.total = ci_data(&s->req);
|
||||
s->logs.bytes_out = s->res.total = ci_data(&s->res);
|
||||
|
@ -302,14 +302,14 @@ struct pendconn *pendconn_add(struct stream *strm)
|
||||
|
||||
if (srv) {
|
||||
srv->nbpend++;
|
||||
strm->logs.srv_queue_size += srv->nbpend;
|
||||
strm->logs.srv_queue_pos += srv->nbpend;
|
||||
if (srv->nbpend > srv->counters.nbpend_max)
|
||||
srv->counters.nbpend_max = srv->nbpend;
|
||||
LIST_ADDQ(&srv->pendconns, &p->list);
|
||||
}
|
||||
else {
|
||||
px->nbpend++;
|
||||
strm->logs.prx_queue_size += px->nbpend;
|
||||
strm->logs.prx_queue_pos += px->nbpend;
|
||||
if (px->nbpend > px->be_counters.nbpend_max)
|
||||
px->be_counters.nbpend_max = px->nbpend;
|
||||
LIST_ADDQ(&px->pendconns, &p->list);
|
||||
|
@ -125,8 +125,8 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
|
||||
s->logs.t_data = -1;
|
||||
s->logs.t_close = 0;
|
||||
s->logs.bytes_in = s->logs.bytes_out = 0;
|
||||
s->logs.prx_queue_size = 0; /* we get the number of pending conns before us */
|
||||
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
||||
s->logs.prx_queue_pos = 0; /* we get the number of pending conns before us */
|
||||
s->logs.srv_queue_pos = 0; /* we will get this number soon */
|
||||
|
||||
/* default logging function */
|
||||
s->do_log = strm_log;
|
||||
|
Loading…
Reference in New Issue
Block a user