/** * \brief Print queue usage * * @param conf output manager's config * @param stat_out_file Output file for statistics */ void statistics_print_buffers(struct output_manager_config *conf, FILE *stat_out_file) { /* Print info about preprocessor's output queue */ MSG_INFO(stat_module, "Queue utilization:"); struct ring_buffer *prep_buffer = get_preprocessor_output_queue(); MSG_INFO(stat_module, " preprocessor output queue: %u / %u", prep_buffer->count, prep_buffer->size); /* Print info about Output Manager's queues */ struct data_manager_config *dm = conf->data_managers; if (dm) { MSG_INFO(stat_module, " output manager output queues:"); MSG_INFO(stat_module, " %.4s | %.10s / %.10s", "ODID", "waiting" ,"total size"); while (dm) { MSG_INFO(stat_module, " [%u] %10u / %u", dm->observation_domain_id, dm->store_queue->count, dm->store_queue->size); dm = dm->next; } } // Print to file if (stat_out_file) { // Add contents here } }
/** * \brief Print queue usage * * @param conf Output Manager config * @param stat_out_file Output file for statistics */ void statistics_print_buffers(struct output_manager_config *conf, FILE *stat_out_file) { if (stat_out_file) { /* Add contents here */ } else { /* Print info about preprocessor's output queue */ MSG_ALWAYS(" | Queue utilization:", NULL); struct ring_buffer *prep_buffer = get_preprocessor_output_queue(); MSG_ALWAYS(" | Preprocessor output queue: %u / %u", prep_buffer->count, prep_buffer->size); /* Print info about Output Manager queues */ struct data_manager_config *dm = conf->data_managers; if (dm) { if (conf->manager_mode == OM_SINGLE) { MSG_ALWAYS(" | Output Manager output queue: %u / %u", dm->store_queue->count, dm->store_queue->size); } else { MSG_ALWAYS(" | Output Manager output queues:", NULL); MSG_ALWAYS(" | %.4s | %.10s / %.10s", "ODID", "waiting", "total size"); while (dm) { MSG_ALWAYS(" | %10u %9u / %u", dm->observation_domain_id, dm->store_queue->count, dm->store_queue->size); dm = dm->next; } } } } }