diff options
author | dormando <dormando@rydia.net> | 2016-06-12 21:57:02 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2016-06-16 17:14:35 -0700 |
commit | 0503b5e2e90f3056c9a034f4fee07782b2c82f5d (patch) | |
tree | c871235292d807b34a6fe8425b62f0f658429ab2 /logger.h | |
parent | ec7a2e02a36f4f1ff5fc0d8c6b0e36e06808a9b8 (diff) | |
download | memcached-0503b5e2e90f3056c9a034f4fee07782b2c82f5d.tar.gz |
some global stats for bg logger
four obvious ones. have a handy place to do the summarization when the logger
wakes up for its run, avoiding the locks.
Diffstat (limited to 'logger.h')
-rw-r--r-- | logger.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -64,7 +64,7 @@ typedef struct _logger { struct _logger *prev; struct _logger *next; pthread_mutex_t mutex; /* guard for this + *buf */ - uint64_t logged; /* entries written to the buffer */ + uint64_t written; /* entries written to the buffer */ uint64_t dropped; /* entries dropped */ uint64_t blocked; /* times blocked instead of dropped */ uint16_t fetcher_ratio; /* log one out of every N fetches */ @@ -90,6 +90,14 @@ typedef struct { bipbuf_t *buf; /* per-watcher output buffer */ } logger_watcher; + +struct logger_stats { + uint64_t worker_dropped; + uint64_t worker_written; + uint64_t watcher_skipped; + uint64_t watcher_sent; +}; + extern pthread_key_t logger_key; /* public functions */ |