update top level client count stats to support filtering per game
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using static SharedLibraryCore.Server;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Dtos
|
||||
{
|
||||
@ -15,11 +15,11 @@ namespace SharedLibraryCore.Dtos
|
||||
/// <summary>
|
||||
/// specifies the game name filter
|
||||
/// </summary>
|
||||
public Game? Game { get; set; }
|
||||
public Reference.Game? Game { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// collection of unique game names being monitored
|
||||
/// </summary>
|
||||
public Game[] ActiveServerGames { get; set; }
|
||||
public Reference.Game[] ActiveServerGames { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
using SharedLibraryCore.Dtos;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
@ -15,19 +16,21 @@ namespace SharedLibraryCore.Interfaces
|
||||
/// Retrieves the max concurrent clients over a give time period for all servers or given server id
|
||||
/// </summary>
|
||||
/// <param name="serverId">ServerId to query on</param>
|
||||
/// <param name="gameCode"><see cref="Reference.Game"/></param>
|
||||
/// <param name="overPeriod">how far in the past to search</param>
|
||||
/// <param name="token">CancellationToken</param>
|
||||
/// <returns></returns>
|
||||
Task<(int?, DateTime?)> MaxConcurrentClientsAsync(long? serverId = null, TimeSpan? overPeriod = null,
|
||||
Task<(int?, DateTime?)> MaxConcurrentClientsAsync(long? serverId = null, Reference.Game? gameCode = null, TimeSpan? overPeriod = null,
|
||||
CancellationToken token = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total number of clients connected and total clients connected in the given time frame
|
||||
/// </summary>
|
||||
/// <param name="overPeriod">how far in the past to search</param>
|
||||
/// <param name="gameCode"><see cref="Reference.Game"/></param>
|
||||
/// <param name="token">CancellationToken</param>
|
||||
/// <returns></returns>
|
||||
Task<(int, int)> ClientCountsAsync(TimeSpan? overPeriod = null, CancellationToken token = default);
|
||||
Task<(int, int)> ClientCountsAsync(TimeSpan? overPeriod = null, Reference.Game? gameCode = null, CancellationToken token = default);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the client count and history over the given period
|
||||
|
Reference in New Issue
Block a user