Add crude shovel stats
This commit is contained in:
parent
2c4a64e76f
commit
0b9c6a3d09
9
queue.c
9
queue.c
|
@ -81,6 +81,8 @@ static int send_to_waiter(subscription_t *sub, sexp_t *body) {
|
|||
static void shoveller(void *qv) {
|
||||
queue_extension_t *q = qv;
|
||||
|
||||
size_t burst_count = 0;
|
||||
size_t total_count = 0;
|
||||
sexp_t *body = NULL; /* held */
|
||||
queue_t examined;
|
||||
subscription_t *sub = NULL;
|
||||
|
@ -120,6 +122,9 @@ static void shoveller(void *qv) {
|
|||
goto find_valid_waiter;
|
||||
}
|
||||
|
||||
burst_count++;
|
||||
total_count++;
|
||||
|
||||
//info("Delivery successful\n");
|
||||
DECREF(body, sexp_destructor);
|
||||
queue_append(&q->waiter_q, &examined);
|
||||
|
@ -127,10 +132,14 @@ static void shoveller(void *qv) {
|
|||
goto check_for_work;
|
||||
|
||||
wait_and_shovel:
|
||||
info("Queue <<%.*s>>: burst count %lu; total %lu\n",
|
||||
sexp_data(q->name).len, sexp_data(q->name).bytes,
|
||||
burst_count, total_count);
|
||||
//info("Waiting for throck\n");
|
||||
q->shovel_awake = 0;
|
||||
suspend();
|
||||
//info("Throck received!\n");
|
||||
burst_count = 0;
|
||||
goto check_for_work;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue