This commit is contained in:
2022-02-17 23:52:33 +00:00
parent 8c5dfb652c
commit 66a260d975
2 changed files with 9 additions and 7 deletions

View File

@@ -26,11 +26,11 @@ namespace AyaNova.Biz
private static double _cpu = 0;
#if (DEBUG)
private static TimeSpan tsOneMinute = new TimeSpan(0, 1, 0);
private static TimeSpan ts24Hours = new TimeSpan(24, 0, 0);
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
#else
private static TimeSpan tsOneMinute = new TimeSpan(0, 1, 0);
private static TimeSpan ts24Hours = new TimeSpan(24, 0, 0);
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
#endif
////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -39,7 +39,7 @@ namespace AyaNova.Biz
{
if (DateUtil.IsAfterDuration(_lastMMSnapshot, tsOneMinute))
if (DateUtil.IsAfterDuration(_lastMMSnapshot, tsMMFrequency))
{
/////////////////////////////////////////////
//ONE MINUTE SNAPS
@@ -89,7 +89,7 @@ namespace AyaNova.Biz
}
_lastMMSnapshot = now;
#if (DEBUG)
log.LogInformation($"DEBUG DD ISSUE: during MM metrics snapshot, _lastDDSnapshot was {_lastDDSnapshot.ToString()}, IsAfterduration return value is {DateUtil.IsAfterDuration(_lastDDSnapshot, ts24Hours)} ");
log.LogInformation($"DEBUG DD ISSUE: during MM metrics snapshot, _lastDDSnapshot was {_lastDDSnapshot.ToString()}, IsAfterduration return value is {DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency)} ");
#endif
}
@@ -98,7 +98,7 @@ namespace AyaNova.Biz
/////////////////////////////////////////////
//ONCE A DAY SNAPS AND CLEANUP
//
if (DateUtil.IsAfterDuration(_lastDDSnapshot, ts24Hours))
if (DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency))
{
#if (DEBUG)
log.LogInformation("DEBUG DD metrics snapshot");