From 1c9eaf2242a600284c16aa545c07deb03fc56197 Mon Sep 17 00:00:00 2001 From: Igor Chorazewicz Date: Thu, 27 Jan 2022 20:59:00 -0500 Subject: [PATCH] Move validateValue call to make sure it is measured by latency tracker --- cachelib/cachebench/cache/Cache-inl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cachelib/cachebench/cache/Cache-inl.h b/cachelib/cachebench/cache/Cache-inl.h index d27a0d5e77..ce1bba0034 100644 --- a/cachelib/cachebench/cache/Cache-inl.h +++ b/cachelib/cachebench/cache/Cache-inl.h @@ -460,14 +460,17 @@ typename Cache::ItemHandle Cache::find(Key key, // find from cache and wait for the result to be ready. auto it = cache_->find(key, mode); it.wait(); + + if (valueValidatingEnabled()) { + XDCHECK(!consistencyCheckEnabled()); + validateValue(it); + } + return it; }; if (!consistencyCheckEnabled()) { auto it = findFn(); - if (valueValidatingEnabled()) { - validateValue(it); - } return it; }