mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[real-time] rename metric label to align with common name (#24732)
GitOrigin-RevId: fd161f2345f0c30aa82395dbca673025698f13fe
This commit is contained in:
@@ -88,7 +88,7 @@ module.exports = {
|
||||
}
|
||||
const [, nConnectedClients] = res
|
||||
Metrics.inc('editing_session_mode', 1, {
|
||||
mode: cursorData ? 'update' : 'connect',
|
||||
method: cursorData ? 'update' : 'connect',
|
||||
status: nConnectedClients === 1 ? 'single' : 'multi',
|
||||
})
|
||||
callback(err)
|
||||
@@ -141,7 +141,7 @@ module.exports = {
|
||||
? 'single'
|
||||
: 'multi'
|
||||
Metrics.inc('editing_session_mode', 1, {
|
||||
mode: 'disconnect',
|
||||
method: 'disconnect',
|
||||
status,
|
||||
})
|
||||
if (status === 'empty') {
|
||||
|
||||
@@ -277,7 +277,7 @@ describe('ConnectedUsersManager', function () {
|
||||
nConnectedClients: 1,
|
||||
cursorData: null,
|
||||
labels: {
|
||||
mode: 'connect',
|
||||
method: 'connect',
|
||||
status: 'single',
|
||||
},
|
||||
},
|
||||
@@ -285,7 +285,7 @@ describe('ConnectedUsersManager', function () {
|
||||
nConnectedClients: 2,
|
||||
cursorData: null,
|
||||
labels: {
|
||||
mode: 'connect',
|
||||
method: 'connect',
|
||||
status: 'multi',
|
||||
},
|
||||
},
|
||||
@@ -293,7 +293,7 @@ describe('ConnectedUsersManager', function () {
|
||||
nConnectedClients: 1,
|
||||
cursorData: { row: 42 },
|
||||
labels: {
|
||||
mode: 'update',
|
||||
method: 'update',
|
||||
status: 'single',
|
||||
},
|
||||
},
|
||||
@@ -301,7 +301,7 @@ describe('ConnectedUsersManager', function () {
|
||||
nConnectedClients: 2,
|
||||
cursorData: { row: 42 },
|
||||
labels: {
|
||||
mode: 'update',
|
||||
method: 'update',
|
||||
status: 'multi',
|
||||
},
|
||||
},
|
||||
@@ -388,21 +388,21 @@ describe('ConnectedUsersManager', function () {
|
||||
'should bump the metric when disconnecting from now empty room': {
|
||||
nConnectedClients: 0,
|
||||
labels: {
|
||||
mode: 'disconnect',
|
||||
method: 'disconnect',
|
||||
status: 'empty',
|
||||
},
|
||||
},
|
||||
'should bump the metric when disconnecting from now single room': {
|
||||
nConnectedClients: 1,
|
||||
labels: {
|
||||
mode: 'disconnect',
|
||||
method: 'disconnect',
|
||||
status: 'single',
|
||||
},
|
||||
},
|
||||
'should bump the metric when disconnecting from now multi room': {
|
||||
nConnectedClients: 2,
|
||||
labels: {
|
||||
mode: 'disconnect',
|
||||
method: 'disconnect',
|
||||
status: 'multi',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user