2021-08-26 18:35:05 -04:00
|
|
|
|
using System;
|
2021-08-29 14:10:10 -04:00
|
|
|
|
using System.Collections.Generic;
|
2021-08-26 18:35:05 -04:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2021-08-29 14:10:10 -04:00
|
|
|
|
using SharedLibraryCore.Dtos;
|
2021-08-26 18:35:05 -04:00
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Interfaces
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Exposes methods to get analytical data about server(s)
|
2021-08-26 18:35:05 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IServerDataViewer
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Retrieves the max concurrent clients over a give time period for all servers or given server id
|
2021-08-26 18:35:05 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="serverId">ServerId to query on</param>
|
|
|
|
|
/// <param name="overPeriod">how far in the past to search</param>
|
|
|
|
|
/// <param name="token">CancellationToken</param>
|
|
|
|
|
/// <returns></returns>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
Task<(int?, DateTime?)> MaxConcurrentClientsAsync(long? serverId = null, TimeSpan? overPeriod = null,
|
|
|
|
|
CancellationToken token = default);
|
|
|
|
|
|
2021-08-26 18:35:05 -04:00
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Gets the total number of clients connected and total clients connected in the given time frame
|
2021-08-26 18:35:05 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="overPeriod">how far in the past to search</param>
|
2021-08-29 14:10:10 -04:00
|
|
|
|
/// <param name="token">CancellationToken</param>
|
2021-08-26 18:35:05 -04:00
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<(int, int)> ClientCountsAsync(TimeSpan? overPeriod = null, CancellationToken token = default);
|
2021-08-29 14:10:10 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Retrieves the client count and history over the given period
|
2021-08-29 14:10:10 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="overPeriod">how far in the past to search</param>
|
|
|
|
|
/// <param name="token">CancellationToken</param>
|
|
|
|
|
/// <returns></returns>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
Task<IEnumerable<ClientHistoryInfo>> ClientHistoryAsync(TimeSpan? overPeriod = null,
|
|
|
|
|
CancellationToken token = default);
|
2021-08-26 18:35:05 -04:00
|
|
|
|
}
|
|
|
|
|
}
|