Update metrics
This commit is contained in:
parent
d30222911d
commit
13f13c8503
@ -23,8 +23,6 @@ final class TableManagement {
|
|||||||
/// The metric describing the number of players currently connected via a websocket
|
/// The metric describing the number of players currently connected via a websocket
|
||||||
private let connectedPlayerCountMetric: Metric<Int>
|
private let connectedPlayerCountMetric: Metric<Int>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Load the tables from a file in the storage folder
|
Load the tables from a file in the storage folder
|
||||||
- Throws: Errors when the file could not be read
|
- Throws: Errors when the file could not be read
|
||||||
@ -64,10 +62,12 @@ final class TableManagement {
|
|||||||
|
|
||||||
private func logPlayingPlayerCount() {
|
private func logPlayingPlayerCount() {
|
||||||
let count = tables.values.sum { $0.playerCount }
|
let count = tables.values.sum { $0.playerCount }
|
||||||
|
playingPlayerCountMetric.update(count)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func logConnectedPlayerCount() {
|
private func logConnectedPlayerCount() {
|
||||||
let count = tables.values.sum { $0.numberOfConnectedPlayers }
|
let count = tables.values.sum { $0.numberOfConnectedPlayers }
|
||||||
|
connectedPlayerCountMetric.update(count)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user