コード例 #1
0
mm_event_dispatch_stats(struct mm_event_dispatch *dispatch)
{
	ENTER();

	mm_thread_t n = dispatch->nlisteners;
	struct mm_event_listener *listeners = dispatch->listeners;
	for (mm_thread_t i = 0; i < n; i++) {
		struct mm_event_listener *listener = &listeners[i];
		struct mm_event_receiver *receiver = &listener->receiver;
		struct mm_event_receiver_stats *stats = &receiver->stats;

		mm_log_fmt("listener %d: loose=%llu, direct=%llu/%llu, forwarded=%llu, published=%llu\n", i,
			   (unsigned long long) stats->loose_events,
			   (unsigned long long) stats->direct_events,
			   (unsigned long long) stats->stolen_events,
			   (unsigned long long) stats->forwarded_events,
			   (unsigned long long) stats->published_events);

		for (int j = 0; j <= MM_EVENT_BACKEND_NEVENTS; j++) {
			uint64_t n = listener->receiver.storage.storage.nevents_stats[j];
			if (j && !n)
				continue;
			mm_log_fmt(" %d=%llu", j, (unsigned long long) n);
		}
		mm_log_str("\n");
	}

	LEAVE();
}
コード例 #2
0
void
mm_abort(void)
{
	mm_log_str("\naborting...\n");
	mm_do_atexit();
	abort();
}