diff --git a/MP.RIOC/MP.RIOC.csproj b/MP.RIOC/MP.RIOC.csproj
index e8d5f3d0..934e2d91 100644
--- a/MP.RIOC/MP.RIOC.csproj
+++ b/MP.RIOC/MP.RIOC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.RIOC
- 8.16.2605.1109
+ 8.16.2605.1110
diff --git a/MP.RIOC/RedisScript/RedisUpdateScript_v5.lua b/MP.RIOC/RedisScript/RedisUpdateScript_v5.lua
index 1b4a2477..7e12447d 100644
--- a/MP.RIOC/RedisScript/RedisUpdateScript_v5.lua
+++ b/MP.RIOC/RedisScript/RedisUpdateScript_v5.lua
@@ -4,11 +4,13 @@ local countInc = tonumber(ARGV[1]) or 0
local totalMsInc = tonumber(ARGV[2]) or 0
local newMax = tonumber(ARGV[3])
local newMin = tonumber(ARGV[4])
-local sentinel = tonumber(ARGV[5])
+local noReply = tonumber(ARGV[5])
+local sentinel = tonumber(ARGV[6])
--- Incrementi base
+-- Incrementi
redis.call('HINCRBY', key, 'count', countInc)
redis.call('HINCRBYFLOAT', key, 'totalMs', totalMsInc)
+redis.call('HINCRBY', key, 'noReply', noReply)
-- MAX
local currentMaxStr = redis.call('HGET', key, 'maxMs')
diff --git a/MP.RIOC/RedisScript/RedisUpdateScript_v6.lua b/MP.RIOC/RedisScript/RedisUpdateScript_v6.lua
index 230ed7f9..0e0cc274 100644
--- a/MP.RIOC/RedisScript/RedisUpdateScript_v6.lua
+++ b/MP.RIOC/RedisScript/RedisUpdateScript_v6.lua
@@ -4,11 +4,13 @@ local countInc = tonumber(ARGV[1]) or 0
local totalMsInc = tonumber(ARGV[2]) or 0
local newMax = tonumber(ARGV[3])
local newMin = tonumber(ARGV[4])
-local sentinel = tonumber(ARGV[5])
+local noReply = tonumber(ARGV[5])
+local sentinel = tonumber(ARGV[6])
-- Incrementi
redis.call('HINCRBY', key, 'count', countInc)
redis.call('HINCRBYFLOAT', key, 'totalMs', totalMsInc)
+redis.call('HINCRBY', key, 'noReply', noReply)
-- MAX
local currentMaxStr = redis.call('HGET', key, 'maxMs')
diff --git a/MP.RIOC/Resources/ChangeLog.html b/MP.RIOC/Resources/ChangeLog.html
index 4380d8ab..1be4f60c 100644
--- a/MP.RIOC/Resources/ChangeLog.html
+++ b/MP.RIOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-RIOC
- Versione: 8.16.2605.1109
+ Versione: 8.16.2605.1110
Note di rilascio:
-
diff --git a/MP.RIOC/Resources/VersNum.txt b/MP.RIOC/Resources/VersNum.txt
index 76353e18..e22e8ebb 100644
--- a/MP.RIOC/Resources/VersNum.txt
+++ b/MP.RIOC/Resources/VersNum.txt
@@ -1 +1 @@
-8.16.2605.1109
+8.16.2605.1110
diff --git a/MP.RIOC/Resources/manifest.xml b/MP.RIOC/Resources/manifest.xml
index 09de1267..acd374a9 100644
--- a/MP.RIOC/Resources/manifest.xml
+++ b/MP.RIOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 8.16.2605.1109
+ 8.16.2605.1110
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip
https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.RIOC/Services/MetricsCalcService.cs b/MP.RIOC/Services/MetricsCalcService.cs
index 81c164c4..39fe50cc 100644
--- a/MP.RIOC/Services/MetricsCalcService.cs
+++ b/MP.RIOC/Services/MetricsCalcService.cs
@@ -48,6 +48,7 @@ namespace MP.RIOC.Services
private class AggregatedStats
{
public long Count;
+ public long NoReply;
public double TotalMs;
public double MaxMs;
public double MinMs = double.MaxValue;
@@ -111,6 +112,10 @@ namespace MP.RIOC.Services
var hoursIndex = HoursIndexKey(dest, method);
var hourScore = ToEpochSeconds(hourStart);
+ // Calcolo NoReply: Somma di tutti i codici >= 400 o errori espliciti
+ long noReplyCount = stat.ErrorMessages.Sum(x => x.Value);
+
+ // 1. INVIO BUCKET PRINCIPALE (con NoReply)
// Usiamo lo script Lua per l'aggiornamento atomico dell'ora
tasks.Add(batch.ScriptEvaluateAsync(_updateScript,
new RedisKey[] { hourKey },
@@ -119,9 +124,34 @@ namespace MP.RIOC.Services
totalMs.ToString(CultureInfo.InvariantCulture),
maxMs.ToString(CultureInfo.InvariantCulture),
minMs.ToString(CultureInfo.InvariantCulture),
+ noReplyCount.ToString(CultureInfo.InvariantCulture),
SentinelValue
}));
+ // 2. INVIO DISTRIBUZIONE STATUS CODES
+ if (stat.StatusCodes.Any())
+ {
+ var statusKey = hourKey + ":status";
+ foreach (var status in stat.StatusCodes)
+ {
+ tasks.Add(batch.HashIncrementAsync(statusKey, status.Key.ToString(), status.Value));
+ }
+ // Aggiungiamo anche questa chiave all'indice per la pulizia automatica
+ tasks.Add(batch.SortedSetAddAsync(hoursIndex, statusKey, hourScore));
+ }
+
+ // 3. INVIO DETTAGLIO ERRORI
+ if (stat.ErrorMessages.Any())
+ {
+ var errorKey = hourKey + ":errors";
+ foreach (var error in stat.ErrorMessages)
+ {
+ // Usiamo HashIncrement per aggregare messaggi uguali
+ tasks.Add(batch.HashIncrementAsync(errorKey, error.Key, error.Value));
+ }
+ tasks.Add(batch.SortedSetAddAsync(hoursIndex, errorKey, hourScore));
+ }
+
tasks.Add(batch.SortedSetAddAsync(hoursIndex, hourKey, hourScore));
// --- LOGICA DAILY (Aggregazione locale per evitare sovrascritture nel loop) ---
@@ -136,6 +166,7 @@ namespace MP.RIOC.Services
}
agg.Count += count;
+ agg.NoReply += noReplyCount;
agg.TotalMs += totalMs;
agg.MaxMs = Math.Max(agg.MaxMs, maxMs);
if (minMs != double.MaxValue)
@@ -162,6 +193,7 @@ namespace MP.RIOC.Services
agg.TotalMs.ToString(CultureInfo.InvariantCulture),
agg.MaxMs.ToString(CultureInfo.InvariantCulture),
finalMin.ToString(CultureInfo.InvariantCulture),
+ agg.NoReply.ToString(CultureInfo.InvariantCulture),
SentinelValue
}));
}