Modifica con dettaglio statistiche aggregate + cambio metodo undek a "/" come default

This commit is contained in:
Samuele Locatelli
2026-04-09 18:39:15 +02:00
parent 09204750c9
commit bb4d10daa0
12 changed files with 156 additions and 29 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Dest.Request", pDestRequest);
result.Add("Dest.Request (#)", pDestRequest);
var pDestDuration = rawData.GroupBy(x => x.Destination)
.Select(g => new StatDataDTO
@@ -118,7 +118,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Dest.Duration", pDestDuration);
result.Add("Dest.Duration (ms)", pDestDuration);
return result;
}
+24 -5
View File
@@ -101,7 +101,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Dest.Request", pDestRequest);
result.Add("Dest.Request (#)", pDestRequest);
var pDestDuration = rawData.GroupBy(x => x.Destination)
.Select(g => new StatDataDTO
{
@@ -110,7 +110,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Dest.Duration", pDestRequest);
result.Add("Dest.Duration (ms)", pDestDuration);
var pTypeRequest = rawData.GroupBy(x => x.Type)
.Select(g => new StatDataDTO
@@ -120,8 +120,7 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Type.Request", pTypeRequest);
result.Add("Type.Request (#)", pTypeRequest);
var pTypeDuration = rawData.GroupBy(x => x.Type)
.Select(g => new StatDataDTO
{
@@ -130,7 +129,27 @@ namespace MP.Data.Services.Utils
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("Type.Duration", pTypeDuration);
result.Add("Type.Duration (ms)", pTypeDuration);
// calcolo le varie statistiche COMPOSTE...
var pDestTypeRequest = rawData.GroupBy(x => new { x.Destination, x.Type })
.Select(g => new StatDataDTO
{
Label = $"{g.Key.Destination}.{g.Key.Type}",
Value = g.Sum(x => x.RequestCount)
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("DestType.Request (#)", pDestTypeRequest);
var pDestTypeDuration = rawData.GroupBy(x => new { x.Destination, x.Type })
.Select(g => new StatDataDTO
{
Label = $"{g.Key.Destination}.{g.Key.Type}",
Value = g.Sum(x => x.RequestCount * x.AvgDuration)
})
.OrderByDescending(x => x.Value)
.ToList();
result.Add("DestType.Duration (ms)", pDestTypeDuration);
return result;
}