Add latency marker for process changes phase for FLASH

Former-commit-id: 61e20b025d45b0af8ed60aab96246b30e4d0ed3d
This commit is contained in:
John Sully 2020-06-04 01:29:17 -04:00
parent bc846d047d
commit 9851fde2fa

View File

@ -2393,10 +2393,14 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
// note: we also copy the DB pointer in case a DB swap is done while the lock is released
std::vector<redisDb*> vecdb; // note we cache the database pointer in case a dbswap is done while the lock is released
if (!fFirstRun) {
mstime_t storage_process_latency;
latencyStartMonitor(storage_process_latency);
for (int idb = 0; idb < cserver.dbnum; ++idb) {
vecdb.push_back(g_pserver->db[idb]);
g_pserver->db[idb]->processChanges();
}
latencyEndMonitor(storage_process_latency);
latencyAddSampleIfNeeded("storage-process-changes", storage_process_latency);
} else {
fFirstRun = false;
}