diff options
Diffstat (limited to 'memcached.h')
-rw-r--r-- | memcached.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/memcached.h b/memcached.h index 9298192..f4cbdd3 100644 --- a/memcached.h +++ b/memcached.h @@ -175,6 +175,17 @@ typedef struct _stritem { + (item)->nsuffix + (item)->nbytes \ + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) +/* Stat processing macros */ + +/* Append a simple stat with a stat name, value format and value */ +#define APPEND_STAT(fmt, name, val) \ + vlen = sprintf(val_str, fmt, val); \ + size = add_stats(pos, name, strlen(name), val_str, vlen, c); \ + *buflen += size; \ + pos += size; \ + assert(*buflen < allocated); + + /** * NOTE: If you modify this table you _MUST_ update the function state_text */ |