27 lines
672 B
Plaintext
27 lines
672 B
Plaintext
@using EgwCoreLib.Lux.Data.Services
|
|
@inject CalcRuidService Req
|
|
|
|
<h3>Statistiche in tempo reale</h3>
|
|
|
|
<div>
|
|
<p>Richieste ultimo minuto: @stats?.RequestsLastMinute</p>
|
|
<p>Richieste ultima ora: @stats?.RequestsLastHour</p>
|
|
<p>Tempo medio: @stats?.ProcessingAvgLastHour ms</p>
|
|
<p>Tempo max: @stats?.ProcessingMaxLastHour ms</p>
|
|
</div>
|
|
|
|
@code {
|
|
private dynamic? stats;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var timer = new PeriodicTimer(TimeSpan.FromSeconds(5));
|
|
|
|
while (await timer.WaitForNextTickAsync())
|
|
{
|
|
stats = await Req.GetStatsAsync();
|
|
StateHasChanged();
|
|
}
|
|
}
|
|
}
|