Slide 13
Slide 13 text
Twitter Inc. | @twemcache
Adding new stats
src/mc_stats.h:
#define STATS_THREAD_METRICS(ACTION)
ACTION( conn_disabled, STATS_COUNTER, "# times accepting connections was disabled")
ACTION( conn_total, STATS_COUNTER, "# connections created until now")
ACTION( conn_struct, STATS_COUNTER, "# new connection objects created")
ACTION( conn_yield, STATS_COUNTER, "# times we yielded from an active connection")
ACTION( conn_curr, STATS_GAUGE, "# active connections")
ACTION( conn_uds, STATS_GAUGE, “# active unix domain sockets”)
...
src/mc_core.c:
stats_thread_incr(conn_disabled);
stats_thread_decr(conn_curr);