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.
diff --git a/include/types/stream.h b/include/types/stream.h
index 0dbc79f..a3137bf 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -105,8 +105,8 @@
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 */
};
diff --git a/src/log.c b/src/log.c
index e2ced80..dcb2ba0 100644
--- a/src/log.c
+++ b/src/log.c
@@ -2135,7 +2135,7 @@
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 @@
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;
diff --git a/src/proto_http.c b/src/proto_http.c
index 9cbf3ed..999c39e 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -4426,8 +4426,8 @@
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);
diff --git a/src/queue.c b/src/queue.c
index 57fd087..aa22256 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -302,14 +302,14 @@
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);
diff --git a/src/stream.c b/src/stream.c
index aa021b0..d741a86 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -125,8 +125,8 @@
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;