From 277fe530add6aebe657d37923e344fef6f9785fb Mon Sep 17 00:00:00 2001 From: Tyna William <65050204+tynawilliam@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:45:12 -0400 Subject: [PATCH] Merge pull request #14294 from overleaf/tw-docupdater-flush add metric to confirm what fraction of flush operations are unnecessary GitOrigin-RevId: 29cff245de56da2cf6c10603570378ee97f00eb7 --- services/document-updater/app/js/DocumentManager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/document-updater/app/js/DocumentManager.js b/services/document-updater/app/js/DocumentManager.js index 9975877d05..5c0798fdfd 100644 --- a/services/document-updater/app/js/DocumentManager.js +++ b/services/document-updater/app/js/DocumentManager.js @@ -296,6 +296,9 @@ module.exports = DocumentManager = { callback(null) } else { logger.debug({ projectId, docId, version }, 'flushing doc') + Metrics.inc('flush-doc-if-loaded', { + status: unflushedTime != null ? 'modified' : 'unmodified', + }) PersistenceManager.setDoc( projectId, docId,