+ counter_t **counters;
+ static int num_worker_threads_set;
+
+ /*
+ * Set once at the beginning of time.
+ * Can't do this from the init routine, which happens before
+ * start_workers sets up vlib_mains...
+ */
+ if (PREDICT_FALSE (num_worker_threads_set == 0))
+ {
+ sm->directory_vector[STAT_COUNTER_NUM_WORKER_THREADS].value =
+ vec_len (vlib_mains) > 1 ? vec_len (vlib_mains) - 1 : 1;
+
+ stat_validate_counter_vector (&sm->directory_vector
+ [STAT_COUNTER_VECTOR_RATE_PER_WORKER],
+ vec_len (vlib_mains));
+ num_worker_threads_set = 1;
+ }