Merge pull request #19455 from overleaf/jpa-metrics

[misc] add metrics for document processing/broadcasting

GitOrigin-RevId: d81de0dfb7a91863547631580f3c85f569718130
This commit is contained in:
Jakob Ackermann
2024-07-19 08:04:34 +00:00
committed by Copybot
parent 6afb067737
commit 0f0d562786
23 changed files with 280 additions and 71 deletions
@@ -26,6 +26,13 @@ describe('ShareJsDB', function () {
requires: {
'./RedisManager': (this.RedisManager = {}),
'./Errors': Errors,
'@overleaf/metrics': {
inc: sinon.stub(),
histogram: sinon.stub(),
Timer: class Timer {
done() {}
},
},
},
})
@@ -89,6 +96,7 @@ describe('ShareJsDB', function () {
beforeEach(function () {
this.start = 35
this.end = 42
this.ops = new Array(this.end - this.start)
this.RedisManager.getPreviousDocOps = sinon
.stub()
.callsArgWith(3, null, this.ops)
@@ -110,6 +118,7 @@ describe('ShareJsDB', function () {
beforeEach(function () {
this.start = 35
this.end = null
this.ops = []
this.RedisManager.getPreviousDocOps = sinon
.stub()
.callsArgWith(3, null, this.ops)