Merge pull request #17268 from overleaf/dp-remove-old-mongo-metrics

Remove timeAsyncMethod mongo metrics

GitOrigin-RevId: 1ba3a1fd51b9d0766355c31791ae9836d832afe8
This commit is contained in:
David
2024-02-28 11:20:53 +00:00
committed by Copybot
parent d08f93c70c
commit 0769329734
15 changed files with 1 additions and 350 deletions
@@ -20,9 +20,6 @@ describe('InstitutionsAPI', function () {
}
this.InstitutionsAPI = SandboxedModule.require(modulePath, {
requires: {
'@overleaf/metrics': {
timeAsyncMethod: sinon.stub(),
},
'@overleaf/settings': this.settings,
requestretry: this.request,
'@overleaf/fetch-utils': {
@@ -53,9 +53,6 @@ describe('ProjectGetter', function () {
this.ProjectGetter = SandboxedModule.require(modulePath, {
requires: {
'../../infrastructure/mongodb': { db: this.db, ObjectId },
'@overleaf/metrics': {
timeAsyncMethod: sinon.stub(),
},
'../../models/Project': {
Project: this.Project,
},
@@ -21,7 +21,6 @@ describe('LearnedWordsManager', function () {
requires: {
'../../infrastructure/mongodb': { db: this.db },
'@overleaf/metrics': {
timeAsyncMethod: sinon.stub(),
inc: sinon.stub(),
},
'@overleaf/settings': {
@@ -19,7 +19,6 @@ describe('UserCreator', function () {
'../../models/User': {
User: this.UserModel,
},
'@overleaf/metrics': { timeAsyncMethod() {} },
'../../infrastructure/Features': (this.Features = {
hasFeature: sinon.stub().returns(false),
}),
@@ -49,9 +49,6 @@ describe('UserGetter', function () {
requires: {
'../Helpers/Mongo': { normalizeQuery, normalizeMultiQuery },
'../../infrastructure/mongodb': this.Mongo,
'@overleaf/metrics': {
timeAsyncMethod: sinon.stub(),
},
'@overleaf/settings': (this.settings = {
reconfirmNotificationDays: 14,
}),