diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index d261092..55c2522 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
WebDoorCreator - Egalware
- Version: 0.9.2402.1614
+ Version: 0.9.2402.1615
Release note:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 952da24..6205485 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-0.9.2402.1614
+0.9.2402.1615
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 95a5db5..e518ba7 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,7 +1,7 @@
-
- 0.9.2402.1614
- http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.API.zip
+ 0.9.2402.1615
+ http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip
http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html
false
diff --git a/WebDoorCreator.API/Controllers/QueueController.cs b/WebDoorCreator.API/Controllers/QueueController.cs
index f2436f7..c0f6044 100644
--- a/WebDoorCreator.API/Controllers/QueueController.cs
+++ b/WebDoorCreator.API/Controllers/QueueController.cs
@@ -169,13 +169,13 @@ namespace WebDoorCreator.API.Controllers
sw.Stop();
// aggiungo..
string statName = "StatusList";
- bool doWrite = await QDataServ.StatUpsert(statName, sw.Elapsed);
+ bool doWrite = await QDataServ.StatUpsert(statName, sw.Elapsed, 5);
// se campione "pieno"...
if (doWrite)
{
// recupero e resetto
ExecStats statRec = await QDataServ.StatReset(statName);
- Log.Info($"Eseguito {statName} | call: {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms");
+ Log.Info($"Eseguito {statName} x {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms");
}
}
return answ;
diff --git a/WebDoorCreator.Data/Services/QueueDataService.cs b/WebDoorCreator.Data/Services/QueueDataService.cs
index 34ac3e3..41857a2 100644
--- a/WebDoorCreator.Data/Services/QueueDataService.cs
+++ b/WebDoorCreator.Data/Services/QueueDataService.cs
@@ -237,7 +237,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("DoorRefreshStatus", sw.Elapsed, 1);
+ await ProcStatLog("DoorRefreshStatus", sw.Elapsed, 1, 0.3);
}
return dictResult;
}
@@ -325,7 +325,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("NumRequestDone", sw.Elapsed, 1);
+ await ProcStatLog("NumRequestDone", sw.Elapsed, 1, 10);
}
return numReq;
}
@@ -350,7 +350,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("NumRequestErrors", sw.Elapsed, 1);
+ await ProcStatLog("NumRequestErrors", sw.Elapsed, 1, 10);
}
return numReq;
}
@@ -375,7 +375,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("NumRequestPending", sw.Elapsed, 1);
+ await ProcStatLog("NumRequestPending", sw.Elapsed, 1, 10);
}
return numReq;
}
@@ -400,7 +400,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("NumRequestProcessing", sw.Elapsed, 1);
+ await ProcStatLog("NumRequestProcessing", sw.Elapsed, 1, 10);
}
return numReq;
}
@@ -432,7 +432,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RedHashGetInt", sw.Elapsed, 0);
+ await ProcStatLog("RedHashGetInt", sw.Elapsed, 0, 0.3);
}
return result;
}
@@ -465,7 +465,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RedHashGetString", sw.Elapsed, 0);
+ await ProcStatLog("RedHashGetString", sw.Elapsed, 0, 0.3);
}
return result;
}
@@ -489,7 +489,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RedHashRemove", sw.Elapsed, 0);
+ await ProcStatLog("RedHashRemove", sw.Elapsed, 0, 0.3);
}
return fatto;
}
@@ -538,7 +538,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RequestDone", sw.Elapsed, 1);
+ await ProcStatLog("RequestDone", sw.Elapsed, 1, 10);
}
return dictResult;
}
@@ -572,7 +572,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RequestDoneGetSingle", sw.Elapsed, 1);
+ await ProcStatLog("RequestDoneGetSingle", sw.Elapsed, 1, 0.3);
}
return dictResult;
}
@@ -627,7 +627,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RequestErr", sw.Elapsed, 1);
+ await ProcStatLog("RequestErr", sw.Elapsed, 1, 10);
}
return dictResult;
}
@@ -682,7 +682,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RequestPending", sw.Elapsed, 1);
+ await ProcStatLog("RequestPending", sw.Elapsed, 1, 10);
}
return dictResult;
}
@@ -737,7 +737,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RequestProcessing", sw.Elapsed, 1);
+ await ProcStatLog("RequestProcessing", sw.Elapsed, 1, 10);
}
return dictResult;
}
@@ -810,7 +810,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("ResetQueue", sw.Elapsed, 1);
+ await ProcStatLog("ResetQueue", sw.Elapsed, 1, 0.3);
}
return fatto;
}
@@ -915,7 +915,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("ResetQueueProcessing", sw.Elapsed, 1);
+ await ProcStatLog("ResetQueueProcessing", sw.Elapsed, 1, 10);
}
return fatto;
}
@@ -1070,8 +1070,9 @@ namespace WebDoorCreator.Data.Services
///
/// Nome statistica
/// Durata esecuzione come timespan
+ /// moltiplicatore soglia x log statistica (default = 1)
///
- public async Task StatUpsert(string statName, TimeSpan duration)
+ public async Task StatUpsert(string statName, TimeSpan duration, double evMultipl)
{
bool answ = false;
RedisKey currKey = new RedisKey(Constants.STATS_DATA);
@@ -1094,7 +1095,7 @@ namespace WebDoorCreator.Data.Services
rawData = JsonConvert.SerializeObject(newStat);
var numRec = await RedHashUpsert(currKey, statName, rawData, false);
// verifico se da considerare superato limite sample
- answ = newStat.NumCall >= statSampleSize;
+ answ = newStat.NumCall >= statSampleSize * evMultipl;
return answ;
}
@@ -1149,7 +1150,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("TakeProcessingItems", sw.Elapsed, 1);
+ await ProcStatLog("TakeProcessingItems", sw.Elapsed, 1, 0.3);
}
return dictResult;
}
@@ -1288,7 +1289,7 @@ namespace WebDoorCreator.Data.Services
{
sw.Stop();
// gestione statistiche
- await ProcStatLog("RedHashUpsert", sw.Elapsed, 0);
+ await ProcStatLog("RedHashUpsert", sw.Elapsed, 0, 0.3);
}
return numReq;
}
@@ -1478,22 +1479,23 @@ namespace WebDoorCreator.Data.Services
///
/// Processa log statistiche:
/// - accumula dati
- /// - se superata soglia registra log
+ /// - se superata soglia (soglia x evMultipl) registra log
///
- ///
- ///
+ /// nome statistica
+ /// durata evento tracciato
///
/// livello richiesto: 0:trace, 1:debug, 2:info, 3:warn, 4:error, 5: fatal, 6: off
///
+ /// moltiplicatore soglia x log statistica (default = 1)
///
- private async Task ProcStatLog(string statName, TimeSpan elapsed, int logLevReq)
+ private async Task ProcStatLog(string statName, TimeSpan elapsed, int logLevReq, double evMultipl)
{
- bool doWrite = await StatUpsert(statName, elapsed);
+ bool doWrite = await StatUpsert(statName, elapsed, evMultipl);
if (doWrite)
{
// recupero e resetto
ExecStats statRec = await StatReset(statName);
- string logMsg = $"Eseguito {statName} | call: {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms";
+ string logMsg = $"Eseguito {statName} x {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms";
switch (logLevReq)
{
case 0:
diff --git a/WebDoorCreator.UI/WebDoorCreator.UI.csproj b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
index ce64ce4..53b5384 100644
--- a/WebDoorCreator.UI/WebDoorCreator.UI.csproj
+++ b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 0.9.2402.1614
+ 0.9.2402.1615
enable
aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608