commit d053999

default  ·  2024-01-08 08:17:38 +0000 UTC
parent 62b2c28
New state variable top_job_fifo_size.
2 files changed,  +4, -0
M snac.h
+3, -0
 1@@ -457,6 +457,9 @@ void job_post(const xs_val *job, int urgent)
 2 
 3         p_state->job_fifo_size++;
 4 
 5+        if (p_state->job_fifo_size > p_state->top_job_fifo_size)
 6+            p_state->top_job_fifo_size = p_state->job_fifo_size;
 7+
 8         /* unlock the mutex */
 9         pthread_mutex_unlock(&job_mutex);
10 
M snac.h
+1, -0
1@@ -50,6 +50,7 @@ typedef struct {
2     int use_fcgi;           /* FastCGI use on/off */
3     time_t srv_start_time;  /* start time */
4     int job_fifo_size;      /* job fifo size */
5+    int top_job_fifo_size;  /* maximum job fifo size seen */
6     int n_threads;          /* number of configured threads */
7     enum { THST_WAIT, THST_IN, THST_QUEUE, THST_STOP } th_state[MAX_THREADS];
8 } srv_state;