adjust log level of cache miss/hit messages

This commit is contained in:
CJ Cobb
2022-03-04 16:45:52 -05:00
parent b332c388d2
commit 9dda99f70a

View File

@@ -58,20 +58,20 @@ BackendInterface::fetchLedgerObject(
auto obj = cache_.get(key, sequence); auto obj = cache_.get(key, sequence);
if (obj) if (obj)
{ {
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - cache hit - " << ripple::strHex(key); << __func__ << " - cache hit - " << ripple::strHex(key);
return *obj; return *obj;
} }
else else
{ {
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - cache miss - " << ripple::strHex(key); << __func__ << " - cache miss - " << ripple::strHex(key);
auto dbObj = doFetchLedgerObject(key, sequence, yield); auto dbObj = doFetchLedgerObject(key, sequence, yield);
if (!dbObj) if (!dbObj)
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - missed cache and missed in db"; << __func__ << " - missed cache and missed in db";
else else
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - missed cache but found in db"; << __func__ << " - missed cache but found in db";
return dbObj; return dbObj;
} }
@@ -94,7 +94,7 @@ BackendInterface::fetchLedgerObjects(
else else
misses.push_back(keys[i]); misses.push_back(keys[i]);
} }
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - cache hits = " << keys.size() - misses.size() << __func__ << " - cache hits = " << keys.size() - misses.size()
<< " - cache misses = " << misses.size(); << " - cache misses = " << misses.size();
@@ -122,10 +122,10 @@ BackendInterface::fetchSuccessorKey(
{ {
auto succ = cache_.getSuccessor(key, ledgerSequence); auto succ = cache_.getSuccessor(key, ledgerSequence);
if (succ) if (succ)
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - cache hit - " << ripple::strHex(key); << __func__ << " - cache hit - " << ripple::strHex(key);
else else
BOOST_LOG_TRIVIAL(debug) BOOST_LOG_TRIVIAL(trace)
<< __func__ << " - cache miss - " << ripple::strHex(key); << __func__ << " - cache miss - " << ripple::strHex(key);
return succ ? succ->key : doFetchSuccessorKey(key, ledgerSequence, yield); return succ ? succ->key : doFetchSuccessorKey(key, ledgerSequence, yield);
} }