Merge pull request #7347 from overleaf/bg-record-snapshot-metrics

record metrics for docupdater range operations

GitOrigin-RevId: 41c500630dd81670d2798d388f2961a19df76b63
This commit is contained in:
Brian Gough
2022-04-07 09:57:01 +00:00
committed by Copybot
parent dc6f480843
commit bd541b4c2d
4 changed files with 97 additions and 8 deletions
@@ -30,6 +30,7 @@ describe('UpdateManager', function () {
'./ShareJsUpdateManager': (this.ShareJsUpdateManager = {}),
'./HistoryManager': (this.HistoryManager = {}),
'./Metrics': (this.Metrics = {
inc: sinon.stub(),
Timer: (Timer = (function () {
Timer = class Timer {
static initClass() {
@@ -489,6 +490,10 @@ describe('UpdateManager', function () {
)
})
it('should increment the doc-snapshot metric', function () {
this.Metrics.inc.calledWith('doc-snapshot').should.equal(true)
})
return it('should call SnapshotManager.recordSnapshot', function () {
return this.SnapshotManager.recordSnapshot
.calledWith(