Пример #1
0
int packet_init() {
    perf_pkt_buff = core_add_perf("pkt_buff", registry_perf_type_gauge, "Number of bytes used by packets", "bytes");
    perf_pkt_in_use = core_add_perf("pkt_in_use", registry_perf_type_gauge, "Number of packets in use", "pkts");

    if (!perf_pkt_buff || !perf_pkt_in_use)
        return POM_ERR;
    return POM_OK;
}
Пример #2
0
int timers_init() {

	perf_timer_processed = core_add_perf("timer_processed", registry_perf_type_counter, "Number of timers processeds", "timers");
	perf_timer_queued = core_add_perf("timer_queued", registry_perf_type_gauge, "Number of timers queued", "timers");
	perf_timer_allocated = core_add_perf("timer_allocated", registry_perf_type_gauge, "Number of timers allocated", "timers");
	perf_timer_queues = core_add_perf("timer_queues", registry_perf_type_gauge, "Number of timer queues", "queues");

	if (!perf_timer_processed || !perf_timer_queued || !perf_timer_allocated || !perf_timer_queues)
		return POM_ERR;

	return POM_OK;
}