Replace instance metrics with map lobby counts (Refs #139)
CI / checks (push) Successful in 4m55s

This commit is contained in:
2026-10-10 16:40:07 -04:00
parent 616b1937ed
commit aebfc7a783
10 changed files with 278 additions and 278 deletions
+15
View File
@@ -155,6 +155,7 @@ describe('metrics background refresh', () => {
game: 't5',
map: 'Moon',
matches,
running: { average: null, peak: 0, capturedHours: 0 },
noEmpty: 0,
availabilityObserved: 0,
availabilityUnknown: 0,
@@ -205,6 +206,7 @@ describe('metrics background refresh', () => {
game: 't5',
map: 'Moon',
matches: emptyMatches,
running: { average: 1, peak: 1, capturedHours: 1 },
noEmpty: 0,
availabilityObserved: 0,
availabilityUnknown: 1,
@@ -232,6 +234,19 @@ describe('metrics background refresh', () => {
]
};
const invalid = [
{ ...value, maps: [{ ...value.maps[0], running: undefined }] },
{
...value,
maps: [{ ...value.maps[0], running: { average: -1, peak: 1, capturedHours: 1 } }]
},
{
...value,
maps: [{ ...value.maps[0], running: { average: 1, peak: '1', capturedHours: 1 } }]
},
{
...value,
maps: [{ ...value.maps[0], running: { average: 1, peak: 1, capturedHours: null } }]
},
{ ...value, autoscalingPaused: undefined },
{ ...value, running: undefined },
{ ...value, previous: { ...value.previous, running: undefined } },