diff options
author | Dustin Sallings <dustin@spy.net> | 2009-03-17 15:02:07 -0700 |
---|---|---|
committer | Dustin Sallings <dustin@spy.net> | 2009-03-23 21:31:56 -0700 |
commit | 2b40d72c04e523d44d46d44e62d416bcf9216c8e (patch) | |
tree | 4fe60c2d17746c424f971c879b9eac7f5fbd252f /slabs.c | |
parent | 7cf9489b2cad1e984bfd58fea5000aa4d5a562e4 (diff) | |
download | memcached-2b40d72c04e523d44d46d44e62d416bcf9216c8e.tar.gz |
stats slab's used_chunks should show chunks put to use
It was a bit unclear what it was doing before, but it started out with
a value equal to total_chunks, which was surely wrong.
This change and its accompanying test ensure the value makes a bit
more sense.
Diffstat (limited to 'slabs.c')
-rw-r--r-- | slabs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -424,7 +424,7 @@ static char *do_slabs_stats(uint32_t (*add_stats)(char *buf, const char *key, bufcurr += nbytes; sprintf(key, "%d:used_chunks", i); - sprintf(val, "%u", ((slabs*perslab) - p->sl_curr)); + sprintf(val, "%u", slabs*perslab - p->sl_curr - p->end_page_free); nbytes = add_stats(bufcurr, key, strlen(key), val, strlen(val), c); linelen += nbytes; bufcurr += nbytes; |