summaryrefslogtreecommitdiff
path: root/src/expire.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expire.c')
-rw-r--r--src/expire.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/expire.c b/src/expire.c
index d2945524c..f79510817 100644
--- a/src/expire.c
+++ b/src/expire.c
@@ -53,15 +53,19 @@
* to the function to avoid too many gettimeofday() syscalls. */
int activeExpireCycleTryExpire(redisDb *db, dictEntry *de, long long now) {
long long t = dictGetSignedIntegerVal(de);
+ mstime_t expire_latency;
if (now > t) {
sds key = dictGetKey(de);
robj *keyobj = createStringObject(key,sdslen(key));
propagateExpire(db,keyobj,server.lazyfree_lazy_expire);
+ latencyStartMonitor(expire_latency);
if (server.lazyfree_lazy_expire)
dbAsyncDelete(db,keyobj);
else
dbSyncDelete(db,keyobj);
+ latencyEndMonitor(expire_latency);
+ latencyAddSampleIfNeeded("expire-del",expire_latency);
notifyKeyspaceEvent(NOTIFY_EXPIRED,
"expired",keyobj,db->id);
signalModifiedKey(NULL, db, keyobj);