From 5c43b80577a3dcdd47df9221ef42e5af22c1c641 Mon Sep 17 00:00:00 2001 From: dormando Date: Tue, 20 Jun 2017 17:30:21 -0700 Subject: add a real slab automover algorithm converts the python script to C, more or less. --- items.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'items.h') diff --git a/items.h b/items.h index fd573aa..54760fa 100644 --- a/items.h +++ b/items.h @@ -46,6 +46,14 @@ void item_stats_sizes_add(item *it); void item_stats_sizes_remove(item *it); bool item_stats_sizes_status(void); +/* stats getter for slab automover */ +typedef struct { + int64_t evicted; + int64_t outofmemory; + uint32_t age; +} item_stats_automove; +void fill_item_stats_automove(item_stats_automove *am); + item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c, const bool do_update); item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv, conn *c); void item_stats_reset(void); -- cgit v1.2.1