summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authorKevin Lin <developer@kevinlin.info>2021-05-20 22:20:01 -0700
committerdormando <dormando@rydia.net>2021-08-06 11:48:33 -0700
commita54f34f34c3ddef3f6e13f62f3ab673f681cac95 (patch)
treee747e4ea935c2e2f90442426a39ea1537932e4fa /items.c
parentfba435c992eda3762a652210e6f75bba75e19e2c (diff)
downloadmemcached-a54f34f34c3ddef3f6e13f62f3ab673f681cac95.tar.gz
Report item sizes for fetch, mutation, and eviction watchers
This adds a new field `size` to logger entry lines for item_get, item_store, and eviction events indicating the size of the associated item in bytes.
Diffstat (limited to 'items.c')
-rw-r--r--items.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/items.c b/items.c
index a5c85b7..65de923 100644
--- a/items.c
+++ b/items.c
@@ -1029,8 +1029,8 @@ item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c
if (settings.verbose > 2)
fprintf(stderr, "\n");
/* For now this is in addition to the above verbose logging. */
- LOGGER_LOG(c->thread->l, LOG_FETCHERS, LOGGER_ITEM_GET, NULL, was_found, key, nkey,
- (it) ? ITEM_clsid(it) : 0, c->sfd);
+ LOGGER_LOG(c->thread->l, LOG_FETCHERS, LOGGER_ITEM_GET, NULL, was_found, key,
+ nkey, (it) ? it->nbytes : 0, (it) ? ITEM_clsid(it) : 0, c->sfd);
return it;
}