char * ofl_structs_queue_stats_to_string(struct ofl_queue_stats *s) { char *str; size_t str_size; FILE *stream = open_memstream(&str, &str_size); ofl_structs_queue_stats_print(stream, s); fclose(stream); return str; }
static void ofl_msg_print_stats_reply_queue(struct ofl_msg_multipart_reply_queue *msg, FILE *stream) { size_t i; fprintf(stream, ", stats=["); for (i=0; i<msg->stats_num; i++) { ofl_structs_queue_stats_print(stream, msg->stats[i]); if (i < msg->stats_num - 1) { fprintf(stream, ", "); }; } fprintf(stream, "]"); }
static void ofl_msg_print_stats_reply_queue(struct ofl_msg_multipart_reply_queue *msg, FILE *stream) { size_t i; extern int colors; fprintf(stream, ", stats=["); for (i=0; i<msg->stats_num; i++) { ofl_structs_queue_stats_print(stream, msg->stats[i]); if (i < msg->stats_num - 1) { if(colors) fprintf(stream, ",\n\n"); else fprintf(stream, ",\n"); }; } fprintf(stream, "]"); }