add metric to confirm what fraction of flush operations are unnecessary GitOrigin-RevId: 29cff245de56da2cf6c10603570378ee97f00eb7
@@ -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,