diff --git a/MP.IOC/Resources/ChangeLog.html b/MP.IOC/Resources/ChangeLog.html
index 36669b87..5f9815a1 100644
--- a/MP.IOC/Resources/ChangeLog.html
+++ b/MP.IOC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MP-IOC
- Versione: 6.16.2604.808
+ Versione: 6.16.2604.809
Note di rilascio:
-
diff --git a/MP.IOC/Resources/VersNum.txt b/MP.IOC/Resources/VersNum.txt
index dd1e9d83..7a4ffb54 100644
--- a/MP.IOC/Resources/VersNum.txt
+++ b/MP.IOC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2604.808
+6.16.2604.809
diff --git a/MP.IOC/Resources/manifest.xml b/MP.IOC/Resources/manifest.xml
index 5503552d..83da1db1 100644
--- a/MP.IOC/Resources/manifest.xml
+++ b/MP.IOC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2604.808
+ 6.16.2604.809
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip
https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html
false
diff --git a/MP.IOC/Services/MetricsCalcService.cs b/MP.IOC/Services/MetricsCalcService.cs
index 226ac493..ad5116f6 100644
--- a/MP.IOC/Services/MetricsCalcService.cs
+++ b/MP.IOC/Services/MetricsCalcService.cs
@@ -58,9 +58,6 @@ namespace MP.IOC.Services
{
method = rawKey;
}
-#if false
- var method = kv.Key;
-#endif
var stat = kv.Value;
var count = Interlocked.Read(ref stat.Count);
var totalMs = stat.TotalDuration.TotalMilliseconds;
diff --git a/MP.IOC/Services/RouteManager.cs b/MP.IOC/Services/RouteManager.cs
index 444f9acc..fe29be9e 100644
--- a/MP.IOC/Services/RouteManager.cs
+++ b/MP.IOC/Services/RouteManager.cs
@@ -103,11 +103,9 @@ namespace MP.IOC.Services
try
{
string sKey = $"{target}|{metodo}";
+
// Registra scelta
_stats.Record(sKey);
-#if false
- _stats.Record(metodo, target);
-#endif
// imposta la Path che vogliamo che YARP appenda al destBase
context.Request.Path = new PathString("/" + relativePath);
@@ -121,9 +119,6 @@ namespace MP.IOC.Services
sw.Stop();
_stats.RecordDuration(sKey, sw.Elapsed);
-#if false
- _stats.RecordDuration(metodo, sw.Elapsed);
-#endif
if (error != ForwarderError.None)
{
diff --git a/MP.IOC/Services/RouteStatsManager.cs b/MP.IOC/Services/RouteStatsManager.cs
index 988abbad..2af2edee 100644
--- a/MP.IOC/Services/RouteStatsManager.cs
+++ b/MP.IOC/Services/RouteStatsManager.cs
@@ -8,41 +8,13 @@ namespace MP.IOC.Services
public TimeSpan TotalDuration = TimeSpan.Zero;
public TimeSpan MaxDuration = TimeSpan.Zero;
public TimeSpan MinDuration = TimeSpan.MaxValue;
-#if false
- public ConcurrentDictionary Destinations = new();
-#endif
public ConcurrentDictionary StatusCodes = new();
}
-#if false
- public class DestinationStats
- {
- public long Count;
- public TimeSpan TotalDuration = TimeSpan.Zero;
- public TimeSpan MaxDuration = TimeSpan.Zero;
- public TimeSpan MinDuration = TimeSpan.MaxValue;
- }
-#endif
-
public class RouteStatsManager
{
private readonly ConcurrentDictionary _map = new();
-#if false
- ///
- /// Registrazione del metodo + destinazione
- ///
- ///
- ///
- public void Record(string method, string destination)
- {
- var stat = _map.GetOrAdd(method, _ => new RouteStats());
- Interlocked.Increment(ref stat.Count);
-
- var destStat = stat.Destinations.GetOrAdd(destination, _ => new DestinationStats());
- Interlocked.Increment(ref destStat.Count);
- }
-#endif
///
/// Registrazione del metodo + destinazione
///
@@ -74,25 +46,6 @@ namespace MP.IOC.Services
{
stat.MinDuration = duration;
}
-
-#if false
- foreach (var destStat in stat.Destinations.Values)
- {
- lock (destStat)
- {
- destStat.TotalDuration += duration;
-
- if (destStat.MaxDuration < duration)
- {
- destStat.MaxDuration = duration;
- }
- if (destStat.MinDuration > duration)
- {
- destStat.MinDuration = duration;
- }
- }
- }
-#endif
}
}
}